You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Chris Dombroski (JIRA)" <ji...@apache.org> on 2015/12/10 15:44:10 UTC

[jira] [Created] (OPENJPA-2619) Cannot specify detach state field when using inheritance

Chris Dombroski created OPENJPA-2619:
----------------------------------------

             Summary: Cannot specify detach state field when using inheritance
                 Key: OPENJPA-2619
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2619
             Project: OpenJPA
          Issue Type: Bug
          Components: Enhance
    Affects Versions: 2.3.0
            Reporter: Chris Dombroski


During ClassMetaData.validateDetachable() a call is made to getDetachedStateField() which returns the closest defined detached state field. This field is simply checked for not null, which causes all subclasses to take the parent-detach-state exception path. 

getDetachedStateField() sets _detachState as a side effect, so either this call should be avoided and the _detachState field checked directly, or the returned field's defining class should be checked against _type depending on if the side effect is required or not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)