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!

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.