我有 2 节课
public class Message : IMessage
{
public virtual int Ik { get; private set; }
public virtual string Description { get; set; }
}
public class Action
{
public virtual int Ik { get; set; }
public virtual IMessage Message { get; set; }
}
hbm映射
<class entity-name="Action" name="ActionBase" table="Action" abstract="true">
<id name="Ik" column="Ik">
<generator class="native"/>
</id>
<many-to-one name="Message" column="MessageFk" class="BusinessComponents.Message.Message, BusinessComponents.Message"/>
</class>
一个问题是如何保护自己不删除消息?