0

I am trying to convert this code:

Component(x => x.User, x =>
        {
            x.References(m => m.UserAccount).Columns(@"UserAccountId", @"UserAccountType");
            x.References(m => m.Postman, @"PostmanId");
        });

back into hbm.xml, my question: is everything alrigh with way I did it or am I missing something? Converted code:

<component name="User">
  <many-to-one name="UserAccount">
    <column name="UserAccountId"/>
    <column name="UserAccountType"/>
  </many-to-one>
  <many-to-one name="Postman" column="PostmanId"></many-to-one>
</component>
Raimonds
  • 537
  • 4
  • 21
  • After hours of investigation I found out I was digging in a wrong direction, I simply missed one mapping, but my PC couldn't evaluate function result in debug, it caused timeout with . If any even, this mapping is correctly translated back to nhibernate from fluent-nhibernate. – Raimonds Apr 01 '15 at 06:37

1 Answers1

1

You can output all of your fluent nhibernate mappings as xml if you want. Sounds a lot easier than this.

Generate XML mappings from fluent Nhibernate

Community
  • 1
  • 1
Cole W
  • 15,123
  • 6
  • 51
  • 85