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: Mapping Existing Domain Objects and Their Collections
PostPosted: Tue Apr 29, 2008 8:39 am 
Newbie

Joined: Tue Apr 29, 2008 8:17 am
Posts: 1
Location: New York, NY
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


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.