-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate collection map and surrogate keys
PostPosted: Wed May 26, 2004 10:38 am 
Regular
Regular

Joined: Tue Dec 09, 2003 2:39 pm
Posts: 106
Location: Toronto, Canada
We have a collection mapped as a Map to a table that has a surrogate key. In our mapping we specify a key, index and a composite-element.

Our issue is that the surrogate key in this table never gets updated in the mapped table.

Question:

1. Should we foregoe the surrogate key here?

2. Is there a way for the mapped table, which is not a Hibernate entity to have its synthetic key assigned automatically when doing an insert?

Regards,
Roll


Top
 Profile  
 
 Post subject: Idbag?
PostPosted: Wed May 26, 2004 10:46 am 
Regular
Regular

Joined: Tue Dec 09, 2003 2:39 pm
Posts: 106
Location: Toronto, Canada
Could we use idbag in this case for our mapped Map non-entity?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 26, 2004 11:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
idbag is most likely the way to go.


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