We have the following method in our codebase:
Here we depend on Hibernates implementation of EntityManager.refresh() without the jpa restriction that the entity has to be managed by the current persistance context.
Our code now fails in Hibernate 5.2. The SessionImpl.refresh(obj) method throws a "Entity not managed"-IllegalArgumentException in fireRefresh(event), because we are "jpa bootstraped" (SessionFactoryOptions.isJpaBootstrap()).
We don't use refresh() regularly in this way, but the hibernate way is nice to have in some cases. It would greatly appreciated if you could somehow integrate our use case back in (maybe with the bigger changes in 6.0?).