fluent-nhibernate
fluent-nhibernate copied to clipboard
How to map a list of an interface to a concrete class
trafficstars
I'd like to map a list of an interface This is my object:
public class Foo
{
public virtual IList<IBar> Bars { get; protected set; }
}
I have several implementations of IBar in my domain model. How do I specify which IBar implementation Foo is using with Fluent NHibernate? I'm using auto mapping and would love if there was a solution with overrides.
I feel like there's a missing Class() method somewhere, but I don't know how to map this with NHibernate, so I'm not sure what I want to do is even possible.
Any info on this? I am running into this as well