阅读背景:

nHibernate:在创建子对象时保存新的父对象

来源:互联网 

I am trying to save a record which has a many-to-one property mapping. I attempt to assign a newly created parent object here (or use an existing, but that works fine) but I get an error when it tries to add the ID of the parent object to the child's table. Saying it cannot add NULL to the table, which is true, but I thought nHibernate was clever enough to save the parent object first, even if I am adding the child. I am trying to save a record which has a many-t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: