Basically I get this exception when trying to delete a collection of objects with nHibernate. Below is my code
public void DeleteAll<T>(IList<T> entities)
{
using(var tx = session.BeginTransaction())
{
try
{
entities.ForEach(e=>session.Delete(e));
tx.Commit();
}
catch(Exception)
{
tx.Rollback();
}
}
}
Using hql works without any problems, but I would prefer to stick with the LINQish approach. Oh, and I'm connecting to an Oracle database.
source
share