|
Greetings,
I am a NHibernate newbie (starting to learn with V1.2). I've gone over the documentation and examples and everything makes sense, but I do have a question.
I am looking at using our existing domain objects with NHibernate. The individual domain objects themselves are fine, since they are basically just classes that all implement a singular interface and expose properties for get and set operations.
My question is related to the groupers that I have for these. In the documentation, there is the example of Cat have an IList of Kittens. While I understand this as it relates to a composite object, what happens if I just want to populate Kittens?
For a better example, I have a domain object that represents a user defined redirect rule. They are grouped and have no parent-level item other than the grouper, which in my world is inherited from a base class called DomainObjectCollection. It does implement IList, like the Kittens do. So, I have a RedirectCollection containing Redirect objects. Can a Redirect Collection be a top-level mapping? In this case, there is no composite, just a collection of objects and I just want to make sure that I can map this scenario, as I have a lot of detached object collections.
Thank you,
Joseph
|