2012-05-10 59 views
2

在MappingByCode中可能有以下hbm.xml映射嗎?compositeid類的子類

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

回答

1

我想通了。

class JoinedSubclassMapping : JoinedSubclassMapping<Subclass> 
{ 
    public JoinedSubclassMapping() 
    { 
     Key(key => 
     { 
      key.Columns(c => c.Name("keypart1"), c => c.Name("keypart2"), c => c.Name("keypart3")); 
     }); 
    } 
}