Bugs item #664335, was opened at 2003-01-08 23:02
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428708&aid=664335&group_id=40712

Category: None
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Thomas Rohwer (tr0000)
Assigned to: Nobody/Anonymous (nobody)
Summary: Saving an object after deleting it does not work

Initial Comment:
This comment refers to version 1.2.2.

I am trying to first delete an object (i.e. making it
transient) and then
create and save a new object with the same id as the
deleted one.
Both of this happens in the same session.

As result an Exception is thrown by the following code
part in
SessionImpl.java:

if ( getEntity(key) != null ) throw new
HibernateException("The generated 
ID is already in use" + infoString(persister, id));

Is it not allowed to do this? This would be
unfortunate, since
the handling for of a non existing object and a deleted
one is different for somebody using the hibernate api.
This makes
it difficult using the same session from independent
code parts.


----------------------------------------------------------------------

>Comment By: Gavin King (oneovthafew)
Date: 2003-01-09 07:14

Message:
Logged In: YES 
user_id=384580

Yes; this does not work. There are a number of reasons for
this. The main reason is that Session.delete() does not
immediately remove a row from the database.

This is not a bug, so I am closing this issue.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428708&aid=664335&group_id=40712


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to