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: many-to-many question
PostPosted: Tue Nov 08, 2005 8:11 am 
Newbie

Joined: Tue Nov 08, 2005 8:06 am
Posts: 2
Hi

I have successfully created a many-to-many mapping with NHibernate using 2 classes and 3 tables (one for the mapping) - everything works as expected.

However, when my collection is persisted to the database, it appears that NHibernate deletes all entries in my mapping table and recreates them from scratch, even though I may have only added or removed one item.

Can someone confirm if this is how NHibernate actually functions, and if so, is there a way to optimise this process?

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 8:58 am 
Newbie

Joined: Tue Nov 08, 2005 8:06 am
Posts: 2
Ok- found the answer. I should have been using an <idbag> :-)


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.