[
https://issues.apache.org/jira/browse/OPENJPA-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985097#comment-17985097
]
Paulo Cristovão de Araújo Silva Filho commented on OPENJPA-2937:
----------------------------------------------------------------
[~solomax], I've found the real issue: when using {{merge()}} instead of
{{persist()}} on first persist, an {{InternalException}} is thrown by
{{AttachStrategy}} because we did not put the {{JavaTypes.UUID_OID}} as a case
of {{attachField}} switch.
This issue title should be "UUID generated id does not work property when using
merge instead of persist on new entity".
I've created a new test ({{{}testMerge{}}}) that fails if the fix is not
applied and added better XML serializing capabilities for UUID fields.
After making comprehensive tests on some databases (hsqldb, h2, h2-2, pg,
mysql), I'll open the PR.
> UUID Generator
> --------------
>
> Key: OPENJPA-2937
> URL: https://issues.apache.org/jira/browse/OPENJPA-2937
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 4.1.1
> Reporter: hantsy bai
> Priority: Major
>
> UUID Id type and Generator is a new feature added in Jakarta Persistence 3.1,
> but still lacked in OpenJPA 4.1.1/TomEE 10.1.0
--
This message was sent by Atlassian Jira
(v8.20.10#820010)