Do you know why the data left behind would interfere with the test the second time, since it's just a simple select query?
I have tried this using Hibernate ORM and it works fine, all the queries return the correct data.