This content has been marked as final. Show 2 replies
The problem seems to be your sequence definition on the entity is not defined, and so using the provider default - in EclipseLink this is to use a SEQUENCE table to hold onto sequence values.
Sequencing options are described here:
What you are doing though is setting the sequence using a trigger instead of allowing the JPA provider to get the sequence value from the Sequence object directly. This is somewhat described here:
And from it I would recommend you instead use the sequence object directly instead of the trigger to set the ID on the row.
I've never used it, but specifying a @ReturnInsert might work using your trigger on the ID: