This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "ON UPDATE RESTRICT in cascade?" Watch "ON UPDATE RESTRICT in cascade?" New topic


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

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
I agree. Here's the link:
subject: ON UPDATE RESTRICT in cascade?
It's not a secret anymore!