Hibernate version: latest
Code between sessionFactory.openSession() and session.close():
Not closing my session really. This is a winform app and I just leave it open. This might be part of my problem.
Full stack trace of any exception that occurs:
://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>ProTrac.vshost.exe</AppDomain><Exception><ExceptionType>NHibernate.ADOException, NHibernate, Version=1.0.2.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc</ExceptionType><Message>could not delete: [DTP.Data.ProjectType#21]</Message><StackTrace> at Lucas.ObjectAccess.HibernateObjectAccessComponent.GetList(Type type) in C:\projects\Lucas\Lucas\ObjectAccess\HibernateObjectAccessComponent.cs:line 226
Name and version of the database you are using:
MsSQL 2000
Hi,
I am having a problem with a failure to delete an object due to a FK constraint. I get an exception back, but I am not sure how to handle the session afterwards. The app appears to handle the exception fine. The user gets a dialog box and hit ok and trys to move on. The problem is when I try to get a list of object next, it still tries to delete the object from before.
So my question is how do I get rid of the previous delete/object when I catch my exception? I have tried to flush, refresh and evict, but I am missing something.
_________________ Thanks,
John
|