Off the top of my head, I think there's a DiscriminatorValue method in SubclassMap.
On Mon, Aug 17, 2009 at 1:59 PM, Martin Nyborg <[email protected]> wrote: > > Ups I hit the return key. I try again > > To start with, yes I have read the wiki :-) > > And congratulation with the release. Fluent NHibernate is very > importing for me and my team. > > here is the code I am trying to convert to SubclassMap > > DiscriminateSubClassesOnColumn<int>("SiteTypeDiscriminator", 0) > .SubClass<SiteNCP>(1, SiteNcpAction) > .SubClass<SiteCandidate>(2, SiteCandidateAction) > .SubClass<SiteForeignOperators>(3, m =>{}); > } > > private void SiteNcpAction(SubClassPart<SiteNCP> obj) > { > obj.HasMany(x => x.InternalCandidates).KeyColumns.Add > ("ParentSiteId").Not.LazyLoad(); > } > > I have created a SubclassMap for the SiteNCP but how can I tell that > the SiteTypeDiscriminator=1 > > public class SiteNCPMap : SubclassMap<SiteNCP> > { > public SiteNCPMap() > { > //SiteTypeDiscriminator=1 > HasMany(x => x.InternalCandidates).KeyColumns.Add > ("ParentSiteId").Not.LazyLoad(); > } > } > > On Aug 17, 2:53 pm, mhnyborg <[email protected]> wrote: > > To start with, yes I have read the wiki :-) > > > > And congratulation with the release. Fluent NHibernate is very > > importing for me and my team. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
