williamay53 wrote:
1. If I don't use the function, then the attribute unsaved-value doesn't have any effect because the document states that "The saveOrUpdate() method now implements this functionality."
It is use when using saveOrUpdate().
Beware cascading strategy. Cascaded objects will always be saveOrUpdated wether the parent is saved or updated, unless you manually save or update the child before the parent.
williamay53 wrote:
2. And what is the meaning of "identity" in your explaination. You mean the Java Object attribute, the attribute in xxx.hbm.xml or even in the RDBMS field or other things.
All of them, they are all related.
williamay53 wrote:
3. In the document hibernate_reference section 7.4 page 50, titled updating object saved or loaded in the current session, it states that updating request both SQL select and update and therefore inefficient and so hibernate offers an alternate approach. But I want to know where is the alternate approach??
Answer is chapter 7.5
williamay53 wrote:
4. And I notice that when I delete the object, it also execute a SQL select statement first in the function session.load and then execute SQL delete, similar to update. Then it there also another approach to avoid this??
Chapter 7.5