This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
 
subject: ON UPDATE RESTRICT in cascade?
 
Similar Threads
Cascade error
About foreign key
Hibernate - DB Cascade
Restore problem
DB2 : about the CASCADE update/delete