我有一个实体:
public class Message:Entity
{
public virtual IList`<`Message> ReplayMessages { set; get; }
public virtual Message ParentMessage { set; get; }
}
I try to override the mapping:
mapping.HasMany(x => x.ReplayMessages)
.AsSet()
.KeyColumnNames.Add("ParentId");
但在 hbm.xml 文件中我得到:
<set name="ReplayMessages">
<key column="MessageFk" />
<one-to-many class="Edi.Core.Model.Message, Edi.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</set>
为什么列键名没有改变?