I'm not sure I've understood your use case 100%, but I think this is what you're after:

https://forum.hibernate.org/viewtopic.php?f=25&t=951801

The solution seems to be to map each subclass independently. If this doesn't help, try to find out how to map this with regular NHibernate. You can also try your question on http://support.fluentnhibernate.org/ once you've collected enough data about the problem to yield a good problem description. :)


-Asbjørn


On Tue, 23 Feb 2010 20:18:13 +0100, Dathan Bennett <dat...@gmail.com> wrote:

I have the following schema (simplified):

EventTbl

   - EventID (PK)
   - Date DateTime
   - EventType String

CourtEventTbl

   - CourtEventID (PK / FK to EventTbl.EventID)
   - CourtEventType String

And some other columns on each table that I don't believe are pertinent to
the discussion at hand.

My question is this - we track two type of court events - civil proceedings and criminal proceedings. We track identical information for the two, but
apply different domain logic, so we map them to two different classes
(CivilCourtEvent and CriminalCourtEvent, each of which are child classes of
the CourtEvent type, which is a child class of the Event type).  All the
properties are on the CourtEvent base class (though several of them are
overridden on the child classes to apply custom logic), so I have it mapped
to the CourtEventTbl.  I figured since there aren't any additional
properties for the Civil and Criminal types, I could just use a
table-per-class-hierarchy strategy and use the CourtEventType as a
discriminator - but the documentation says you can't mix-and-match subclass and joined-subclass mappings, so I guess I can't do that? Is there any way
to accomplish what I'm after here?

~Dathan

--
You received this message because you are subscribed to the Google Groups "Fluent 
NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to