Hi,
I have some trouble with hiberante fetching query. It is a very basic hql but it gets result randomly.
Following is my code,
Query query = session.createQuery("from Transaction where transactionId=:id");
query.setParameter("id", transactionId)
List list = query.list();
I am sure data with transactionId is in database.
The weird thing is the list I got works randomly. I have 50% chance to get a empty and another 50% chance to get correct data.
It only happens after I just inserted this row before close a session.
Anyone had similar problem and cue to slove it?
|