-->
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.  [ 3 posts ] 
Author Message
 Post subject: Assigned Id and saveOrUpdate for cascades
PostPosted: Mon Apr 19, 2004 4:29 am 
Newbie

Joined: Mon Nov 10, 2003 7:39 pm
Posts: 8
As far as i understood hibernate uses id property to identify what type of the SQL statement should be executed: id is null - insert, id is not null - update. And in the same time i'd like to have 'assigned' id to cache object by id and to have ability to compare/hash objects by id. With assigned id saveOrUpdate doesn't work correctly and i have to choose store(save or update) method myself. That's ok but cascades does not work at all and i can't affect them either! Is there any way to have assigned id and use saveOrUpdate method?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 4:31 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Use unsaved-value for version/timestamp propertys or use a custom interceptor.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 5:32 am 
Newbie

Joined: Mon Nov 10, 2003 7:39 pm
Posts: 8
thx, it works with Interceptor.isUnsaved()


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.