-->
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: Extending set functionality for manty-to-many
PostPosted: Thu Dec 22, 2005 5:06 am 
Regular
Regular

Joined: Tue Mar 15, 2005 12:38 pm
Posts: 73
Location: Bucharest
After lots of tests I have come to the obvious conclusions that:
- mapping bag to many-to-many is totally inefficient
- using idbag leads to a kind of unpredictable behaviour (I will post the issue on JIRA shortly)
- set seem to be the best choice for many-to-many

But the problem is that our db design methodology requires the usage of an id for all tables (including many-to-many simple tables). Because the set does not allow creating id-s for the many-to-many table, what I would like to know is how can I extend it's functionallity somehow...

The first ideea is to save some meta values in the mapping and to modify the insert statement to insert also a value for the id column. I don't mind nhibernate using the fk-pair for update/delete, all I want is to insert the id.

Now the question is where is the best choice to do this, or what interface is in charge with creating the SQL fragment for insert for collections...

I will surely dig in on my own, but any ideeas would be appreciated...

Dragos


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 23, 2005 1:01 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Dig in the direction towards CollectionPersister. Note that you can override the collection persister to be used for a collection in the mapping file.


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.