Multiple Interface implementaion property mapping - NHibernate
Hi everyone I'm faced with the following issue, to which i'm sure there must be a solution but i cannot seems to find one.
Looking at the following small piece of code (assuming ID's and all exists):
interface IBehave
{}
class A : IBehave
{}
class B : IBehave
{}
class Owner
{
IBehave Behave { get; set; }
}
Here's what i'm looking to accomplish: Assuming A and B are already mapped by their concrete classes I want to ma开发者_开发百科p the Owner class in such a way that querying it will instantiate the correct interface implementation as the property.
Thanks for the help!
精彩评论