R – NHibernate / Castle activerecord: How to get object that caused database exception

castle-activerecordnhibernate

Can I somehow get the object that caused a GenericADOException (constraint exception)?

Or How can I only flush one object so I can tell which one is the problem.

I have a list of object that are displayed in a form, and can be edited and added to. On flush it gives me a database exception but I can't tell which object gave the exception.

I can't move the constraint to nhibernate.

Best Answer

Have you tried using NHibernate Profiler? It should give you additional details as to which one is the problem.