2

MappingByCode 中是否可以进行以下 hbm.xml 映射?

<joined-subclass>
  <key>
    <column name="keypart1"/>
    <column name="keypart2"/>
    <column name="keypart3"/>
  </key>
4

1 回答 1

1

我想到了。

class JoinedSubclassMapping : JoinedSubclassMapping<Subclass>
{
    public JoinedSubclassMapping()
    {
        Key(key =>
        {
            key.Columns(c => c.Name("keypart1"), c => c.Name("keypart2"), c => c.Name("keypart3"));
        });
    }
}
于 2012-05-16T06:38:08.263 回答