Skip to content

How to map a list of an interface to a concrete class #44

@jagregory

Description

@jagregory

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions