| I'm reopening this issue because I believe the fix is inconsistent with JPA. Documentation for `EntityNotFoundException` says: "The EntityNotFoundException is thrown by the persistence provider when an entity reference obtained by getReference is accessed but the entity does not exist. ... The current transaction, if one is active and the persistence context has been joined to it, will be marked for rollback. I've created a PR that adds a test that follows what is defined by JPA. It fails with the current fix. After reverting the commit, the test will pass (after resolving conflicts). Sorry for the last notice on this. I've been working on a different issue involving @NotFound and realized this could be a problem. |