Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2211

Owned OneToMany/ManyToOne relations with GAE is broken

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.2.RELEASE
    • Fix Version/s: 1.1.3.RELEASE
    • Component/s: GAE
    • Labels:
      None

      Description

      When an entity field is flagged as a OneToMany/ManyToOne relation, the Roo generated code *_Roo_GAE.aj indiscriminately tags the .id with @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true"). This can be problematic because the default entity id type is Long and it cannot be assigned the "gae.encoded-pk" extension:

      "...A field with the "gae.encoded-pk" extension can only be applied to a String primary key..."

      The _Roo_GAE code should be adjusted to make sure the .id field is a String.

      A second problem related to the same issue is that when you manually define the entity's .id as a String, this breaks the *_Roo_JavaBean.aj code that expects Long id's to set/get the related HashSets...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jtyrrell James Tyrrell
                Reporter:
                mrsvan Stefaan Vanderheyden
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: