Say I have the following class with an aggregation of an external class:
public class MyMovie
{
public virtual string id{get;set;}
public virtual Movie movie{get;set;}
}
//These classes are externally defined and cannot be changed.
public class Movie
{
public string title{get;set;}
public IList<Director> Directors{get;set;}
}
public class Director
{
public string name{get;set;}
public IList<Movie> DirectedMovies{get;set;}
}
The db schema for this would be three tables:
Movie(m_id, title)
Director(d_id, name)
Directs(m_id, d_id)
Is it possible to map this with fluent nhibernate? I just don't understand how this would be done with the many to many relation being in the external classes where I cannot map create a map class for Director as this does not define members as virtual.