Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:2.17[/b]
Hi guys:
I've encountered this problem, any help as to the cause of the problem and/or solutions will be greatly appreciated. I"m using Hibernate 2.17 by the way.
the actions sequence involves,
1. using hibernate hql query to select a list of objects. e.g. select * from tableA.
2. select one of the result object for modification, then call the session.update() function.
3. insert new object of the same type into the database with session.save() function.
4. now the "PROBLEM" I would call session.clear(), then carry out the same query as step 1. In the newly returned list includes the object which I inserted under step 3, as well as the object i updated in step 2. However, the modifications which I made to the object in step two is not shown, the old values are returned. When I conduct the exact same query again, the changes are then shown.
This to me seems like some sort of caching mechanism, but I thought the session.clear() call is suppose to take care of that possibility.
Has anyone came across similar situation???
Thanks heaps for the help, or just reading thru my question.
William