James, Should I use a MapClass to manually add the sub classes? Or should I use an override convention on the BaseClass?
-Mark On Fri, Jan 15, 2010 at 1:12 AM, Mark Nijhof <[email protected]> wrote: > Hi James, > > Thanks for the suggestion, I'll give #1 a good try tomorrow. By doing > so is it still possible to have these in different tables vs using a > discriminator? > > -Mark > > > On Thu, Jan 14, 2010 at 4:32 PM, James Gregory <[email protected]> > wrote: >> I've not had a great deal of experience with what I'm about to suggest, but >> I know at least Hudson has dealt with it in the past so he might weigh in >> later. >> Your entities aren't actually related as far as NHibernate is concerned. >> They're not being mapped as subclasses of anything, so NH doesn't know how >> to pull them all together in one query. There are really two ways to handle >> this: >> >> Map Debt and have all descendants be joined-subclasses, then NH should be >> happy with your association because it knows how they're all linked together >> Map your collection as a many-to-any, which is a polymorphic association >> which allows for these kind of things; however, they can be pretty tricky to >> figure out how to put together. >> >> I would personally side with 1, but that's just me. As far as I'm aware we >> don't support many-to-any's in FNH, so you'd have to map that particular >> entity with hbm.xml. >> On Thu, Jan 14, 2010 at 2:11 PM, Mark Nijhof <[email protected]> wrote: >>> >>> Hi, >>> >>> I have an issue mapping an IList<BaseClass> where the different >>> concrete types are in the list. I think I need a discriminator but I >>> am not sure actually. >>> >>> Used CodePast for some syntax highlighting: http://codepaste.net/k97k9y >>> >>> -Mark >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Fluent NHibernate" group. >>> 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/fluent-nhibernate?hl=en. >>> >>> >>> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Fluent NHibernate" group. >> 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/fluent-nhibernate?hl=en. >> >> >
-- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. 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/fluent-nhibernate?hl=en.
