Hi All,
I am child on Hiberate. I read the tutorial. But, I have a question. Please see the following example:
1. Assume, there is a table, called customers. 2. The table contain a field, called age. 3. Now, I want to change the age to 10. The coding is:
tx = session.beginTransaction(); Customer customers=session.load(Customer.class, new long(1)); customer.setAge(customer.getAge()+1); tx.commit();
I don't know, when "txt.commit()" statement is executed, Hibernate framework why know the customer's age need to update?
Thanks.
Liu Ming
|