I'm using hibernate in a multiuser environment. This means, many users are able to update an object on the database at the same time using different (hibernate) sessions.
My problem is, that an object o, that was once loaded from the db, is cached and not reloaded from db, until I force this by an explicit session.reload(o). This means, if o belongs to a result of a session.find() it's not reloaded, even if the database tupel, that belongs to o, was updated and committed by another session. So the session, that uses the find(), doesn't get the actual persistent state of o.
What I need, is a mechanism, that forces the find() command, to reload object o, when the database tupel has been changed between session.load() and session.find().
Any idea? Thanks in advance.
|