This is the expected behaviour in Hibernate 1.x. However, Hibernate2 is
less fussy and
doesn't mind if you delete an object twice.




                                                                                       
                                               
                    "Matt Dowell"                                                      
                                               
                    <[EMAIL PROTECTED]>                To:     <[EMAIL PROTECTED]>     
                      
                    Sent by:                                cc:                        
                                               
                    [EMAIL PROTECTED]       Subject:     [Hibernate] FW: 
cirrus.hibernate.ObjectDeletedException:     
                    eforge.net                               Object was already 
deleted: 32                                           
                                                                                       
                                               
                                                                                       
                                               
                    11/02/03 08:29 AM                                                  
                                               
                                                                                       
                                               
                                                                                       
                                               




I think I have this one traced down and I would like some comments. I
have a one-to-many-to-many and the last 'many' can belong to multiple
(2) instances. So when the first deletion of the last class happens, the
entry.status = DELETED in Session.java. The second time it comes around
it hits this line:

if (entry.status!=LOADED) throw new ObjectDeletedException("Object was
already deleted", entry.id);

Which is where I get my error. When I comment out that line I get in an
infinite loop. Is there a work-around for this scenario? Thanks.

Matt


-----Original Message-----
From: Matt Dowell
Sent: Monday, February 10, 2003 2:04 PM
To: '[EMAIL PROTECTED]'
Subject: cirrus.hibernate.ObjectDeletedException: Object was already
deleted: 32


I am getting this error in my test. Here is what I have

1) I have a one-to-many and the many has a one-to-many. Three entities
all linked.
2) cascade="all"
3) I can create the objects, with the relationships just fine.
4) When I load an object (the one) and call session.delete(oneObject) I
get this error:

cirrus.hibernate.ObjectDeletedException: Object was already deleted: 32

5) The '32' I think is the ID of the last MANY class..

Any ideas? Thanks,

Matt Dowell
Notiva Corp.


-------------------------------------------------------
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




**********************************************************************
Any personal or sensitive information contained in this email and
attachments must be handled in accordance with the Victorian Information
Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988
(Commonwealth), as applicable.

This email, including all attachments, is confidential.  If you are not the
intended recipient, you must not disclose, distribute, copy or use the
information contained in this email or attachments.  Any confidentiality or
privilege is not waived or lost because this email has been sent to you in
error.  If you have received it in error, please let us know by reply
email, delete it from your system and destroy any copies.
**********************************************************************





-------------------------------------------------------
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