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

        Hide
        Oliver Ringel added a comment -

        Here is the test case.

        Show
        Oliver Ringel added a comment - Here is the test case.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development