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

Reverse engineer disable versions and generated identifiers

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.2.2.RELEASE
    • Fix Version/s: None
    • Component/s: @ CORE, PERSISTENCE
    • Environment:
      Ubuntu 12.04, JDK 1.6.0_33, Maven 3.0.4, Oracle 10.2.0.4

      Description

      Problem: When "database reverse engineer" the application may not work because there are some behaviors we can't control:

      • With all persistence providers, identifier generator fails because sequence not exists in database.
      • A table with a column named "version" is configured as concurrency control property when is not (even not numeric).

      Solution: Create "database reverse engineer" command new options to control this behaviors:

      • disableVersionFields (optional, default false): If true, don't add concurrency control feature to version field and generate field as other fields. All entities will have versionField="" attribute in RooJpaActiveRecord annotation.
      • disableGeneratedIdentifiers (optional, default false): If true, don't add generated value feature to identifier field and add field into create view (required and i18n). All entities will have sequenceName="" attribute in RooJpaActiveRecord annotation. This modification allows to disable generated identifiers into direct engineer setting versionField="" attribute in RooJpaActiveRecord annotation too.

      I attach a patch with this solution diffs.

      This solution has been tested.

      See ROO-3281, ROO-3254 and ROO-3255, ROO-2596

        Attachments

        1. patch.diff
          32 kB
          Mario Martínez Sánchez - gvNIX - DISID

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                mmartinez Mario Martínez Sánchez - gvNIX - DISID
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified