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....
|