Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:2.1.7
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:Oracle 9i EE
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hi Folks,
I hope someone can help me with the following problem.
I am using the following query to get users by their status from the database:
<query name="RmsBenutzer.findByStatus">
<![CDATA[
from RmsBenutzer u where u.status = :status order by upper(u.login)
]]>
</query>
I get the userlist without any problem. Now when I change a user attribute (let's say his firstname) and query the database again, i get alternatively the previous and the new value. The new value is saved to DB without any problem.
When i change the value(firstname) four times for example, the following queries return one of the four values randomly.
I played with the cache issues to solve the problem with out any success.
I tried this too:
Code:
Session sess = SessionFactoryHelper.getCurrentSession();
Query q = sess.createQuery("from RmsBenutzer where status = "+status.intValue()+" order by upper(login)");
q.setCacheRegion("CacheRegionOfTheRMSUserList");
q.setForceCacheRefresh(true);
List testuserlist = q.list();
sess.flush();
without any success.
For Information my application is running on SAP WAS and i am using the
DB-Connection through a datasource.
Thank you for nay help.
Alioum