Hibernate Memo Knowledge Points:
1, never manually modify the OID, because it will cause the data in the cache is not accurate
2. The Update method in the session interface is the solution to convert a Free state object into a persisted object
3, the session interface in the Saveorupdate method, if the transmission is instantaneous object, the execution of Save, if the incoming is a free object, the implementation of the Update method
4, if you are using lazy loading, and session.close () in the servlet has been executed, then get the child table data in the JSP will be error, this delay loading, lazy loading has said that the solution is after Session.close () plus hibernate.initialize (user); The instantiation of the proxy class.
The concept of a proxy class in Hibernate is a class with only one OID, so when using lazy loading, the child table data in the list is all proxy classes.
Hibernate memo at your disposal