流畅的NHibernate自动化问题与2类退出相同的类

时间:2011-03-19 17:36:01

标签: fluent-nhibernate

例如:

public class Foo
{
   IList<Bar> bars;
}

public class Bar
{
   public Foo ParentFoo;
}

public class NewBar
{
   public Foo ParentFoo2;
}

自动生成的映射是针对引用Foo类的最后一个类。 Foo类的映射是:

<bag name="Bars">
  <key>
    <column name="ParentFoo2_id" /> 
  </key>
  <one-to-many class="Bar" /> 
</bag>

我正在使用Fluent NHibernate 1.1和NHibernate 2.1.2.4000。

1 个答案:

答案 0 :(得分:0)

我转向流利的nhibernate v1.2,现在看来一切正常。