Using NHibernate 3.2, XML and Loquacious interface (mixed), QueryOver 
interface (but it isn't the problem)

I have two classes that have a Parent->Child (one-to-many) relationship. 
The collection I use is a Set. Both of them have a discriminator. Both of 
the discriminators use the  "table per class hierarchy"  "mode". So, for 
example I have

BaseParent, ParentOne, ParentTwo classes and Parent table
BaseChild, ChildOne, ChildTwo classes and Child table.

I have put the ISet in the BaseParent class, so I have an 

    ISet<BaseChild> Children { get; set; }

and everything works correctly. 

Now my question is: if I know that ParentOne will only have ChildOne childs 
and ParentTwo will only have ChildTwo childs BUT I want to keep the ISet<> 
in the BaseParent class, is there a way to remove the BaseChild 
discriminator and "reuse" the BaseParent discriminator? (I know how to 
solve it moving the ISet in ParentOne (as an ISet<ChildOne>) and in 
ParentTwo (as an ISet<ChildTwo), but I need to be able to access 
"agnostically" BaseChild(s) from BaseParent(s))

What I want is to move the Set mapping in the ParentOne and ParentTwo 
mappings, but tell to the mappings the type of the item they'll load/write.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/srMtE6K-3BEJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to