Hi, Andrea, thanks for looking into this. Your setup looks almost identical to mine. The only difference I can think of is that in my case I did not create the User and Role instances in the my test, so when I query for the user, the user object does not exist in session cache and Hibernate has to construct the user object from the database. Could it be that since you create the users in the test so the user objects are served from the session cache in your test? |