I have just started using Hibernate (with Netbeans 6.1). Almost everything seems to be working properly.. I'm writing a small web application which uses a MySQL database.
I have a class 'User' which I am attempting to update. I make the changes to the User object, call session.save(u) and tx.commit() and I can see the changes in the database. So far, so good.
Now I log out of the web app and log back in as the user I just modified. And the field that got changed (an access control field named 'Role') shows the original value, not the changed value. If I kill Tomcat and restart it, then when I log in the new user Role value shows up.
Somehow, the original user information is being cached, and I don't see where that happens. Can someone point me in the right direction? When I logged in the second time, I reloaded the user from the database (I think) but that didn't seem to help.
Thanks very much,
nbc
|