OpenJPA
  1. OpenJPA
  2. OPENJPA-1611

Wrong PersistentAttributeType returned for @Embedded types

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: jpa
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Attribute.getPersistentAttributeType() should return PersistentAttributeType.EMBEDDED for @Embedded types.
      It returns PersistentAttributeType.ONE_TO_ONE now.

      I guess this also has effects on Attribute.isAssociation() which returns true for @Embedded types.

      1. openjpa-1611.tar
        7 kB
        Oliver Ringel

        Activity

        Oliver Ringel created issue -
        Hide
        Oliver Ringel added a comment -

        Here is the test case.

        Show
        Oliver Ringel added a comment - Here is the test case.
        Oliver Ringel made changes -
        Field Original Value New Value
        Attachment openjpa-1611.tar [ 12440697 ]
        Hide
        Fay Wang added a comment -

        Hi Oliver, can you check if the fix resolve your problem?

        Show
        Fay Wang added a comment - Hi Oliver, can you check if the fix resolve your problem?
        Hide
        Oliver Ringel added a comment -

        Hi Fay,
        I made a test with the latest snapshot (2.1.0-SNAPSHOT).
        Attribute.getPersistentAttributeType() is returning the correct value now.

        But I think you have to fix Attribute.isAssociation() too. It should return false for @Embedded types.
        Maybe my above description was not clear enough.

        Show
        Oliver Ringel added a comment - Hi Fay, I made a test with the latest snapshot (2.1.0-SNAPSHOT). Attribute.getPersistentAttributeType() is returning the correct value now. But I think you have to fix Attribute.isAssociation() too. It should return false for @Embedded types. Maybe my above description was not clear enough.
        Donald Woods made changes -
        Assignee Fay Wang [ faywang ]
        Patch Info [Patch Available]
        Donald Woods made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Resolution Fixed [ 1 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        7d 20h 49m 1 Donald Woods 11/Apr/10 14:30
        Resolved Resolved Closed Closed
        11d 6h 59m 1 Donald Woods 22/Apr/10 21:30

          People

          • Assignee:
            Fay Wang
            Reporter:
            Oliver Ringel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development