-->
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: Can merge() re-create deleted objects?
PostPosted: Mon Sep 25, 2006 2:17 am 
Newbie

Joined: Thu Sep 21, 2006 12:38 am
Posts: 2
Hi,

I am using Hibernate3-3.2.0.dev-20060906, with annotations for mappings and I have the following issues:
I create an object in one session and become persisted in the db. When the session is closed this object becomes a detached object. In a separate session I retrieve this object and delete it from db. In another fresh session, I call merge() on the detached object and the result I got is that the object is persisted to the db (re-created). I am wondering if this is correct. I would think is dangerous and should not be allowed to persist detached objects that were deleted in a previous session.
I debugged the code and it seems to be an issue caused by the fact that there is no specified value for unsaved-value for versioning. Using annotation, I couldn’t find a corresponding parameter for the @Version annotation.
Please, advise.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 04, 2006 7:01 pm 
Regular
Regular

Joined: Thu Aug 26, 2004 9:23 pm
Posts: 71
I agree I believe this to be incorrect behaviour. HHH-1661 exists but was closed without an explanation. it appears the user form isn't helping either.

Mike


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.