【发布时间】:2009-10-03 08:19:13
【问题描述】:
在我的应用程序中,我需要保存从 WCF 服务接收到的 NHibernate 实体。
目前我正在为此使用会话 SaveOrUpdate 方法。
通常我们不需要编辑引用属性,所以我从客户端收到对象,它有空集合。但我不希望这个空集合反映在数据库中。
例子:
public class Product
{
public virtual string Name {get;set;}
public virtual IList<Stores> Stores {get;set;} <--- Stores is empty, but should not be cleared in databse.
}
谢谢, 奥克萨娜。
【问题讨论】:
-
能否更详细地解释一下您的问题?
标签: wcf nhibernate