1

In my domain I have a Transport which can access Endpoints at certain positions, as such I have the following:

public class Transport
{
    public IDictionary<Endpoint, int> AccessPointPosition { get; set; }
}

Now I'm trying to map the AccessPointPosition through a combination of HasMany and AsMap, but I haven't succeeded in finding anything that passes the Fluent NHibernate configuration.

Am I overlooking something? Is this impossible? Is there any documentation on this subject?

Radim Köhler
  • 122,561
  • 47
  • 239
  • 335
mycroes
  • 645
  • 8
  • 20

1 Answers1

6

The mapping with fluent could be like this:

HasMany(x => x.AccessPointPosition)
   // these are most likely by convention
   // .Table("tbl_AccessPointPosition") 
   // .KeyColumn("Transport_id")
   // ...
   .AsEntityMap("Endpoint_id")
   .Element("integer_col", part => part.Type<int>());

Some other related questions:

Community
  • 1
  • 1
Radim Köhler
  • 122,561
  • 47
  • 239
  • 335