Hi there,
I would like to know if i have a
Session s = factory.openSession();
Transaction tx = s.beginTransaction();
.......
tx.commit();
s.close();
block like this, and in the middle of it i create a new object and session.save() it but however, further down the line but before the tx.commit(), an error occurs and tx.rollback is called, would the saving of the new object be rolled back too? cos from what i remember from experience, the object seem to stay persistent in the database even after i have rolled back the code. Could some one please shed some light on this?
Best Regards
|