As we all know hibernate use inspection as dirty-check strategy. In the flushing process of session, hibernate will inspect all the persistent object( associated with the session) to make sure if the object is dirty. my questions are
1) how to judge a persistent object is dirty or not. Does hibernate do this by comparation to the column in the database or snapshot, what the snapshort really means in the context of a session.
2) Suppose there is a large amout of persistent objects in the session, that will be a time-consuming work. is this right?
3) If there is a object graph framework, all the changes in the graph can be observed, thus we can get a change summary of the object graph, and we can tell hibernate only persist the changes. that's is to say auto-dirty-check in hibernate is of no use,so there is no need to call flush method of the session. is this right?
|