I`m trying to understand more of the behaviour of transactions and sessions in Hibernate. And we where experimenting with the following:
session.saveOrUpdate(object1);
Transaction t = session.beginTransaction();
session.saveOrUpdate(object2)
t.commit();
After the commit, object1 and object2 are both committed to the database. I find the strange, because object1 is not part of the transaction but it is committed. Is this the default behaviour of a Transaction?


Reply With Quote