-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Database ON DELETE/UPDATE CASCADE to CascadeType.?
PostPosted: Mon Aug 02, 2010 8:21 am 
Beginner
Beginner

Joined: Thu May 20, 2010 12:31 pm
Posts: 28
Hello,

I'm not talking about generating DDL or anything. I just want to find out what the JPA/Hibernate equivalents of

ON DELETE CASCADE and
ON UPDATE CASCADE

are in terms of the CascadeType's REMOVE, PERSIST, MERGE, and REFRESH (if translatable at all).

Is it:

ON DELETE CASCADE -> CascadeType.REMOVE and
ON UPDATE CASCADE -> {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}

Note I'm relatively new to Hibernate, so if they're incompatible I'd like to know as well.

Karsten


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.