-->
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.  [ 2 posts ] 
Author Message
 Post subject: Utilizing cascade delete in hibernate
PostPosted: Fri May 05, 2006 3:28 pm 
Newbie

Joined: Fri May 05, 2006 3:22 pm
Posts: 1
I had a question about utilizing cascade delete in hibernate. I currently use the cascade delete functionality in hibernate. hibernate does not utilize the rdbms functionality to implement this feature. May I still specify my rdbms tables to use the cascade on delete functionality without screwing up hibernate or must I turn it off in my rdbms. Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 07, 2006 4:58 am 
Regular
Regular

Joined: Tue Mar 23, 2004 2:10 am
Posts: 51
Hi,
From performance perspective it is better to use RDBMS cascade delete behavior. In case you use RDBMS functionality then there is no need to specify it in hibernate mapping. But you need to be carefull here because if the now deleted rows of related tables are already loaded by hibernate then they have became obsolete or removed now. Also you need to expiciltly evict tha cache if u r using one. In case you want to do it with hibernate then u have to bear it that hibernate is not using database functionality here as there are certain OR impedence problems. You may consider using bulk update feature but it also face same problems in caching or in case they are already loaded.


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

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.