WEIGHT: 66 kg
Bust: AA
One HOUR:130$
NIGHT: +50$
Services: Spanking, BDSM, Oral Without (at discretion), Soft domination, 'A' Levels
View unanswered posts View active topics. These old forums are deprecated now and set to read-only. We are waiting for you on our new forums! Posted: Thu Sep 15, pm.
Hibernate version: 3. When an object is loaded session. If I do some modification on object, and after load it again the hibernate updates this object against database and don't make an other select, because the object is in cache.
I think this behavior is undesired because if I reload the object I don't want the modifications anymore and I wish discard it. So, in this case why hibernate don't invalidate the cache and reload my object?
If I want save the update, I'll call session. I still want local cache for this object, then I don't want to use session. Some clues on this? Hi, I believe that the behavior you are describing cannot be parametrized and is intended to work this way. Maybe what is confusing you is the name LOAD, which sounds like it retrieves data directly from the database. The cache system is meant to prevent Hibernate from constantly hitting the database.
There would be no point in having it constantly check if data is outdated. You would face the opposite problem of erasing changes to your entities in long transactions or long sessions. Maybe you can achieve what you want by using session. It will reload the state from the database. But I don't understand why you do not want to use session. You might as well get rid of it and it will be reloaded on demand.