Dear Jojo,
Thanks very much. I have created a very simple project to demostrate the problem. You can download it here
http://www.box.net/public/r4czvjy32i. It contains the project source code and a SetupTables.sql file to create necessary tables in the database.
I am using SQL2005, Visual Studio 2005, NHibernate 1.2.0 alpha 1.
This is the output i found in Log\demo.txt
Code:
15:18:21.482 [2868] INFO DemoLog - Insert first order ...
15:18:21.685 [2868] INFO DemoLog - Insert first order done.
15:18:21.685 [2868] INFO DemoLog - ********************
15:18:21.685 [2868] INFO DemoLog - Insert second order ...
15:18:21.716 [2868] ERROR DemoLog - Insert Error
NHibernate.ADOException: could not insert: [OrphanDeleteSample.Order] ---> System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_Order_OrderNo'. Cannot insert duplicate key in object 'dbo.Order'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\BatcherImpl.cs:line 224
at NHibernate.Persister.Entity.AbstractEntityPersister.InsertImpl(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 1771
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersister.InsertImpl(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 1815
at NHibernate.Persister.Entity.SingleTableEntityPersister.Insert(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\SingleTableEntityPersister.cs:line 564
at NHibernate.Persister.Entity.SingleTableEntityPersister.Insert(Object[] fields, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\SingleTableEntityPersister.cs:line 483
at NHibernate.Impl.ScheduledIdentityInsertion.Execute() in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\ScheduledIdentityInsertion.cs:line 38
at NHibernate.Impl.SessionImpl.Execute(IExecutable executable) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 3163
at NHibernate.Impl.SessionImpl.DoSave(Object theObj, EntityKey key, IEntityPersister persister, Boolean replicate, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 970
at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 882
at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 777
at NHibernate.Impl.SessionImpl.Save(Object obj) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 718
at OrphanDeleteSample.OrderService.Insert(Order order) in C:\Devel\OrphanDeleteSample\OrderService.cs:line 55
15:18:21.732 [2868] INFO DemoLog - Insert second order done.
15:18:21.732 [2868] INFO DemoLog - ********************
15:18:21.732 [2868] INFO DemoLog - Insert second order after ...
15:18:21.732 [2868] ERROR DemoLog - Insert Error
NHibernate.ADOException: Could not save object ---> NHibernate.AssertionFailure: no collection snapshot for orphan delete
at NHibernate.Impl.CollectionEntry.GetOrphans(Type entityName, IPersistentCollection collection) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\CollectionEntry.cs:line 423
at NHibernate.Engine.Cascades.DeleteOrphans(Type entityName, IPersistentCollection pc, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 700
at NHibernate.Engine.Cascades.CascadeCollection(CascadingAction action, CascadeStyle style, CollectionType collectionType, IType elemType, Object child, CascadePoint cascadeVia, ISessionImplementor session, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 690
at NHibernate.Engine.Cascades.Cascade(ISessionImplementor session, Object child, IType type, CascadingAction action, CascadeStyle style, CascadePoint cascadeTo, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 582
at NHibernate.Engine.Cascades.Cascade(ISessionImplementor session, IEntityPersister persister, Object parent, CascadingAction action, CascadePoint cascadeTo, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 641
at NHibernate.Impl.SessionImpl.DoSave(Object theObj, EntityKey key, IEntityPersister persister, Boolean replicate, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 991
at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 882
at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 763
--- End of inner exception stack trace ---
at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 781
at NHibernate.Impl.SessionImpl.Save(Object obj) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 718
at OrphanDeleteSample.OrderService.Insert(Order order) in C:\Devel\OrphanDeleteSample\OrderService.cs:line 55
15:18:21.732 [2868] INFO DemoLog - Insert second order after fix done.
and in general.txt
Code:
15:18:20.747 [2868] INFO NHibernate.Cfg.Environment - NHibernate 1.2.0.1001 (1.2.0.Alpha1)
15:18:20.763 [2868] INFO NHibernate.Cfg.Environment - Bytecode provider name : lcg
15:18:20.763 [2868] INFO NHibernate.Cfg.Environment - Using reflection optimizer
15:18:20.779 [2868] INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: OrphanDeleteSample.Order.hbm.xml
15:18:20.857 [2868] INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2005Dialect
15:18:20.888 [2868] INFO NHibernate.Cfg.HbmBinder - Mapping class: OrphanDeleteSample.Order -> Order
15:18:20.966 [2868] INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: OrphanDeleteSample.OrderItem.hbm.xml
15:18:20.966 [2868] INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2005Dialect
15:18:20.982 [2868] INFO NHibernate.Cfg.HbmBinder - Mapping class: OrphanDeleteSample.OrderItem -> OrderItem
15:18:20.982 [2868] INFO NHibernate.Cfg.Configuration - processing one-to-many association mappings
15:18:20.997 [2868] INFO NHibernate.Cfg.HbmBinder - mapping collection: OrphanDeleteSample.Order.OrderItems -> OrderItem
15:18:20.997 [2868] INFO NHibernate.Cfg.Configuration - processing one-to-one association property references
15:18:20.997 [2868] INFO NHibernate.Cfg.Configuration - processing foreign key constraints
15:18:21.013 [2868] INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2005Dialect
15:18:21.013 [2868] INFO NHibernate.Connection.ConnectionProviderFactory - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
15:18:21.013 [2868] INFO NHibernate.Connection.ConnectionProvider - Configuring ConnectionProvider
15:18:21.013 [2868] INFO NHibernate.Cfg.SettingsFactory - Optimize cache for minimal puts: False
15:18:21.013 [2868] INFO NHibernate.Cfg.SettingsFactory - Default schema set to: dbo
15:18:21.029 [2868] INFO NHibernate.Cfg.SettingsFactory - Query language substitutions: {}
15:18:21.029 [2868] INFO NHibernate.Cfg.SettingsFactory - cache provider: NHibernate.Cache.HashtableCacheProvider
15:18:21.029 [2868] INFO NHibernate.Cfg.Configuration - instantiating and configuring caches
15:18:21.029 [2868] INFO NHibernate.Impl.SessionFactoryImpl - building session factory
15:18:21.185 [2868] INFO NHibernate.Impl.SessionFactoryObjectFactory - no name configured
15:18:21.482 [2868] INFO DemoLog - Insert first order ...
15:18:21.685 [2868] INFO DemoLog - Insert first order done.
15:18:21.685 [2868] INFO DemoLog - ********************
15:18:21.685 [2868] INFO DemoLog - Insert second order ...
15:18:21.685 [2868] WARN NHibernate.Util.ADOExceptionReporter - System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_Order_OrderNo'. Cannot insert duplicate key in object 'dbo.Order'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\BatcherImpl.cs:line 224
at NHibernate.Persister.Entity.AbstractEntityPersister.InsertImpl(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 1771
15:18:21.716 [2868] ERROR NHibernate.Util.ADOExceptionReporter - Violation of UNIQUE KEY constraint 'IX_Order_OrderNo'. Cannot insert duplicate key in object 'dbo.Order'.
The statement has been terminated.
15:18:21.716 [2868] ERROR DemoLog - Insert Error
NHibernate.ADOException: could not insert: [OrphanDeleteSample.Order] ---> System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_Order_OrderNo'. Cannot insert duplicate key in object 'dbo.Order'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\BatcherImpl.cs:line 224
at NHibernate.Persister.Entity.AbstractEntityPersister.InsertImpl(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 1771
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersister.InsertImpl(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 1815
at NHibernate.Persister.Entity.SingleTableEntityPersister.Insert(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\SingleTableEntityPersister.cs:line 564
at NHibernate.Persister.Entity.SingleTableEntityPersister.Insert(Object[] fields, Object obj, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Persister\Entity\SingleTableEntityPersister.cs:line 483
at NHibernate.Impl.ScheduledIdentityInsertion.Execute() in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\ScheduledIdentityInsertion.cs:line 38
at NHibernate.Impl.SessionImpl.Execute(IExecutable executable) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 3163
at NHibernate.Impl.SessionImpl.DoSave(Object theObj, EntityKey key, IEntityPersister persister, Boolean replicate, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 970
at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 882
at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 777
at NHibernate.Impl.SessionImpl.Save(Object obj) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 718
at OrphanDeleteSample.OrderService.Insert(Order order) in C:\Devel\OrphanDeleteSample\OrderService.cs:line 55
15:18:21.732 [2868] INFO DemoLog - Insert second order done.
15:18:21.732 [2868] INFO DemoLog - ********************
15:18:21.732 [2868] INFO DemoLog - Insert second order after ...
15:18:21.732 [2868] ERROR NHibernate.AssertionFailure - An AssertionFailure occured - this may indicate a bug in NHibernate
NHibernate.AssertionFailure: no collection snapshot for orphan delete
15:18:21.732 [2868] WARN NHibernate.Util.ADOExceptionReporter - NHibernate.AssertionFailure: no collection snapshot for orphan delete
at NHibernate.Impl.CollectionEntry.GetOrphans(Type entityName, IPersistentCollection collection) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\CollectionEntry.cs:line 423
at NHibernate.Engine.Cascades.DeleteOrphans(Type entityName, IPersistentCollection pc, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 700
at NHibernate.Engine.Cascades.CascadeCollection(CascadingAction action, CascadeStyle style, CollectionType collectionType, IType elemType, Object child, CascadePoint cascadeVia, ISessionImplementor session, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 690
at NHibernate.Engine.Cascades.Cascade(ISessionImplementor session, Object child, IType type, CascadingAction action, CascadeStyle style, CascadePoint cascadeTo, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 582
at NHibernate.Engine.Cascades.Cascade(ISessionImplementor session, IEntityPersister persister, Object parent, CascadingAction action, CascadePoint cascadeTo, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 641
at NHibernate.Impl.SessionImpl.DoSave(Object theObj, EntityKey key, IEntityPersister persister, Boolean replicate, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 991
at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 882
at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 763
15:18:21.732 [2868] ERROR NHibernate.Util.ADOExceptionReporter - no collection snapshot for orphan delete
15:18:21.732 [2868] ERROR DemoLog - Insert Error
NHibernate.ADOException: Could not save object ---> NHibernate.AssertionFailure: no collection snapshot for orphan delete
at NHibernate.Impl.CollectionEntry.GetOrphans(Type entityName, IPersistentCollection collection) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\CollectionEntry.cs:line 423
at NHibernate.Engine.Cascades.DeleteOrphans(Type entityName, IPersistentCollection pc, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 700
at NHibernate.Engine.Cascades.CascadeCollection(CascadingAction action, CascadeStyle style, CollectionType collectionType, IType elemType, Object child, CascadePoint cascadeVia, ISessionImplementor session, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 690
at NHibernate.Engine.Cascades.Cascade(ISessionImplementor session, Object child, IType type, CascadingAction action, CascadeStyle style, CascadePoint cascadeTo, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 582
at NHibernate.Engine.Cascades.Cascade(ISessionImplementor session, IEntityPersister persister, Object parent, CascadingAction action, CascadePoint cascadeTo, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Engine\Cascades.cs:line 641
at NHibernate.Impl.SessionImpl.DoSave(Object theObj, EntityKey key, IEntityPersister persister, Boolean replicate, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 991
at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 882
at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 763
--- End of inner exception stack trace ---
at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 781
at NHibernate.Impl.SessionImpl.Save(Object obj) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 718
at OrphanDeleteSample.OrderService.Insert(Order order) in C:\Devel\OrphanDeleteSample\OrderService.cs:line 55
15:18:21.732 [2868] INFO DemoLog - Insert second order after fix done.