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

json itd creating incorrect code in controller_json.aj file when Entity Id field is not named "id"

    Details

      Description

      When creating a JSON-ed Controller for a JSON-ed Entity where the @Id field is not named "id", the controller_roo_controller_json.aj file creates invalid code. I have attached the project for review (via roo backup).

      Here are the steps in the log.roo file:

      // Spring Roo 1.2.0.RELEASE [rev 39eb957] log opened at 2012-01-29 11:21:14
      project --topLevelPackage roo.json.issue --projectName roo-json-issue --java 6
      // Spring Roo 1.2.0.RELEASE [rev 39eb957] log closed at 2012-01-29 11:21:15
      // Spring Roo 1.2.0.RELEASE [rev 39eb957] log opened at 2012-01-29 11:21:18
      jpa setup --database H2_IN_MEMORY --provider HIBERNATE
      entity jpa --class ~.domain.Product
      field string --fieldName productName --column productname --notNull true
      // I manually added the @Id annotation to the productName field in the Product file
      web mvc json setup
      json all
      web mvc json all --package ~.web

        Attachments

          Activity

            People

            • Assignee:
              stewarta Alan Stewart
              Reporter:
              klee Kyung Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: