[ 
https://issues.apache.org/jira/browse/OPENJPA-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Solodovnik resolved OPENJPA-2952.
---------------------------------------
      Assignee: Richard Zowalla
    Resolution: Fixed

> 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
>            Assignee: Richard Zowalla
>            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)

Reply via email to