-->
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: Persisting new entities only if modified
PostPosted: Tue Jul 12, 2011 4:45 am 
Senior
Senior

Joined: Fri May 08, 2009 12:27 pm
Posts: 168
I have a scenario where objects are created, and should be persisted only if they are modified later on.
I could track which objects were created that way myself, but hey, Hibernate is keeping track of the dirty status for me, so I should be able to leverage that dirty checking to drive the decision which newly-created object belongs to the database and which can be silently dropped, right?
Besides, Session does not give me a way to check whether a given object is dirty. I'd have to go through unofficial interfaces and risk that my code breaks in future versions of Hibernate to do that.


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.