persist() should throw JPA's EntityExistsException if passed detached instance

Description

Currently we throw our own PersistentObjectException when you pass a detached object to persist(), but actually JPA says we’re supposed to throw EntityExistsException. Now, this is a sort of weak requirement of the spec, and so the TCK apparently doesn’t test it, but it’s pretty clear we’re not doing what we’re supposed to do here.

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created September 5, 2023 at 12:48 PM
Updated September 19, 2023 at 9:09 AM
Resolved September 7, 2023 at 1:26 PM

Flag notifications