-->
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.  [ 1 post ] 
Author Message
 Post subject: Custom Collection object (shared primary key?)
PostPosted: Tue Jul 05, 2005 2:47 pm 
Regular
Regular

Joined: Tue May 31, 2005 3:18 pm
Posts: 117
Location: Houston
I want to provide a more robust RoleCollection object in my library rather than use the generic IList that NHibernate wants to give me.

My first reaction was to keep a side-by-side collection of my own, and remove/add from my list while updating the NHibernate-aware list.

This is not an ideal situation, and I didn't like it very much. I decided to create a RoleCollection object, but in this instance, the primary key of the RoleCollection would be the UserID, since each user must have 1 role collection.

How would I map this?

I originally had a table for RoleCollection, but it only had 1 column, the primary key value (which is really meaningless).

Is there any way to get my RoleCollection class to operate off of the UserID primary key, but not do any persisting to a table? All of the data is in a separate join table....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.