[
https://issues.apache.org/jira/browse/OPENJPA-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18125298#comment-18125298
]
ASF subversion and git services commented on OPENJPA-2952:
----------------------------------------------------------
Commit b09ee3e2f6bd0fcaddd275cf3c76024d4f304e04 in openjpa's branch
refs/heads/master from Paulo Cristovão de Araújo Silva Filho
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=b09ee3e2f ]
Merge pull request #205 from apache/OPENJPA-2952
[OPENJPA-2952] Require evidence of persistence before assuming detached
> Transient object wrongly assumed detached in flush check
> --------------------------------------------------------
>
> Key: OPENJPA-2952
> URL: https://issues.apache.org/jira/browse/OPENJPA-2952
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion thread:
> https://github.com/apache/openjpa/pull/144#discussion_r3682999635
> **(medium)** This early-return treats any unmanageable instance of a known
> entity type as detached without verifying it was ever persisted, so a truly
> transient unenhanced object referenced without cascade now passes the check
> and fails later (or silently persists a broken FK). Line 824 also adds
> `_broker.isDetached(obj, true)`, a DB round-trip inside the flush path for
> every manageable object without a state manager. Can both paths at least
> verify a non-null/assigned identity before assuming detached?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)