-->
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.  [ 5 posts ] 
Author Message
 Post subject: Delete then insert object ...
PostPosted: Fri Aug 06, 2004 3:20 am 
Newbie

Joined: Fri Aug 06, 2004 12:23 am
Posts: 3
I've caught this everytime i load an object A, hibernate auto-delete and insert same records to a table ( that i call by using collection mapping in the object A mapping file)..
Have anyone here caught this strange thing too ?? Plz explain me why if you know and have free time.
Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 06, 2004 3:52 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
http://www.hibernate.org/hib_docs/reference/en/html/performance.html#performance-collections
replace bag with inverse="false" by list


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 06, 2004 3:56 am 
Newbie

Joined: Fri Aug 06, 2004 12:23 am
Posts: 3
thankx for the answer, but i dont use bag in my mapping, just set and map, and this strange action happens in both


Top
 Profile  
 
 Post subject: Re: Delete then insert object ...
PostPosted: Sun Aug 08, 2004 2:30 pm 
Beginner
Beginner

Joined: Mon Aug 02, 2004 1:08 pm
Posts: 42
pojo wrote:
I've caught this everytime i load an object A, hibernate auto-delete and insert same records to a table ( that i call by using collection mapping in the object A mapping file)..
Have anyone here caught this strange thing too ?? Plz explain me why if you know and have free time.
Thank you


Would be nice to see some code.
I had similar behaviour when I used myCollection.addAll(theCollection) in setMyCollection instead of myCollection=theCollection.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 08, 2004 2:49 pm 
Regular
Regular

Joined: Mon Feb 23, 2004 10:42 pm
Posts: 102
Location: Washington DC
When asking questions, give at least:
# the Hibernate version
# your mapping documents
# the Java code between sessionFactory.openSession() and session.close()
# the full stack trace of any exception that occurs
# the name and version of the database you are using
# a debug level Hibernate log excerpt is also appreciated

_________________
Matt Veitas


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