| If a query or a find is issued with a PESSIMISTIC_WRITE lock and the active session contains the relevant entities then Hibernate will ignore the fresh data returned from the database. The problem is reproduced in the attached test case for version 5. The same problem also occurs in version 4. |