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

Cannot specify detach state field when using inheritance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.0
    • None
    • Enhance
    • 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

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

            Dates

              Created:
              Updated: