5

Is it possible yet to do a one-to-one mapping with fluent nhibernate? I have the following as part of an hbm that I'm trying to convert to fluent:

    <one-to-one name="Person" property-ref="FileData" constrained="true"/>

I see a OneToOnePart<OTHER> in the code but i'm not sure how or if this is used to accomplish this.

Thanks!

Chris Conway
  • 16,269
  • 23
  • 96
  • 113

1 Answers1

14

There is a HasOne mapping

map => map.HasOne(x => x.Person)
     .PropertyRef(x => x.FileData)
     .Constrained();

I think that's what you're looking for.

gcores
  • 12,376
  • 2
  • 49
  • 45