Mapping to a different view based on child type

Posted by Ryan Burnham on Stack Overflow See other posts from Stack Overflow or by Ryan Burnham
Published on 2012-10-21T22:56:24Z Indexed on 2012/10/21 23:00 UTC
Read the original article Hit count: 142

So i have a situation where i have common base type but i need to map to a different view based on the child type.

It looks like i can use a generic mapping class to handle the inheritance

http://geekswithblogs.net/nharrison/archive/2010/07/09/inheriting-a-class-map-in-fluent-nhibernate.aspx

But how can i conditionally map to a different view based on the child type? I see an EntityType property but it says its obsolete and will be made private in the next version.

As an example i have a base class of ContactInfo is standard between contact types but the values come from different places depending on the contact type, this I'll handle through the sql view.

© Stack Overflow or respective owner

Related posts about fluent-nhibernate

Related posts about fluent-nhibernate-mapping