Hello,
I'm using hibernate 3.6 to control all the DB transactions with MSSQL 2008.
I have the following code:
Code:
Session session = sessionFactory.getCurrentSession();
session.setFlushMode(FlushMode.MANUAL);
Transaction tx = session.beginTransaction();
User u = new User();
session.save(u);
Thread.sleep(10000);
session.flush()
tx.commit();
While the thread is sleeping I can't read the current data from the table users (with the mssql studio management), why? (I understand if hibernate lock the table for inserting, but why for reading and updating).
Thank you.
* Edit: My bad, it's only lock the new record. If I use select top x * from table the data returns