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

Owned OneToMany/ManyToOne relations with GAE is broken

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Complete
    • 1.1.2.RELEASE
    • 1.1.3.RELEASE
    • GAE
    • 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

              jtyrrell James Tyrrell
              mrsvan Stefaan Vanderheyden
              Archiver:
              tmarshall Trevor Marshall

              Dates

                Created:
                Updated:
                Resolved:
                Archived: