阅读背景:

Nhibernate:处理ITransaction异常,以便新事务可以继续使用相同的ISession

来源:互联网 

I have a list of 10 data objects that I want to insert/update to the database using NHibernate. If one throws an exception (say a primary key violation) I want to still insert/update the other 9. I rolled each object operation into its own atomic transaction, and roll back the transaction if there is an exception. Problem is that if a transaction does cause an exception and is rolled back, on the next transaction Nhibernate complains with the error: null id in Nexus.Data.PortfolioCorporateEntity entry I have a list of 10 data objects that I want to




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

分享到: