|
|
|
|
|
by eeperson
1890 days ago
|
|
I'm not talking about "dirty checking". I'm talking about "automatic dirty checking". Take for example this code I got from this article[1]: SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
Session session = sessionFactory.openSession();
Transaction tx = session.beginTransaction();
Person person = session.load(Person.class, 2); //loads Person object for id 2
person.setAge(32);
tx.commit();
session.close();
HibernateUtil.closeSessionFactory();
It results in an updated age for the person in the DB. However, EntityManager was never directly notified about the change in the person object.[1] - https://learnjava.co.in/automatic-dirty-checking-in-hibernat... |
|