I am trying to use a local persistence engine such as H2 or HSQL and I ran into a problem during testing. Whenever I do a criteria query I get the correct results. However, if I then perform the same query back to back the second returned list is always empty.
example :
//this list will contain the correct data:
List correctList = this.session.createCriteria(SomeMappedClass.class).list();
//If I perform the same criteria query again I now get an empty list
List emptyList= this.session.createCriteria(SomeMappedClass.class).list(),
I have run this test on both h2 and hsql; both have the same problem.
Any ideas?
Thanks
|