*
The moose likes Object Relational Mapping and the fly likes ON UPDATE RESTRICT in cascade? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "ON UPDATE RESTRICT in cascade?" Watch "ON UPDATE RESTRICT in cascade?" New topic
Author

ON UPDATE RESTRICT in cascade?

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
Is this SQL:



the same as this:


(How can I do the update restrict? Is this implicitly set with this annotation?

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

It looks the same, but it isn't. The big difference is where your database supports on update restrict and on delete cascade (not all do) this will happen all the time, regardless of which application connects to the database to manipulate the date. In the case of an ORM offering this behaviour it will happen only when that specific application manipulates the data.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ON UPDATE RESTRICT in cascade?