Cable wrote:
Greetings,
Code between sessionFactory.openSession() and session.close():
using (ISession session = mySessFactory.OpenSession())
{
using (ITransaction tx = session.BeginTransaction())
{
try
{
session.SaveOrUpdateCopy(obj);
tx.Commit();
}
catch (Exception ex)
{
tx.Rollback();
}
finally
{
session.Flush();
}
}
}
Name and version of the database you are using:
MySql 5.0
Not sure if this is case, but: You are flushing the session AFTER the tarnsaction is committed or rolled back. Maybe You should get rid of Session.Flush all together as transaction.Commit has already executed it....
Gert