Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2619

Cannot specify detach state field when using inheritance

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: Enhance
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chris.dombroski Chris Dombroski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: