Hydration of an entity might fail (because of a failing setter, a broken conversion, ...) and Hibernate perfectly returns with an exception on the first attempt to load such an entity. The persistence context however still caches the partly hydrated instance and returns it when asked for that entity a second time. We would expect the same exception as for the first attempt? You find a simple test case for this behavior here: https://github.com/abenneke/sandbox/tree/master/hibernate-hydrate |