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

Add ability to define field uniqueness constraints

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.0.0.RC1
    • Fix Version/s: 1.1.0.RC1
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      I think it would be a useful feature for Roo to provide a way to define a field, or set of fields, as unique. For example, when adding a new field to a class:

      add field string -fieldName myField -unique ....

      That would then create a database column with a uniqueness constraint? Otherwise I will have to go in and manually add this constraint to all the columns that need it in the db.

      Also, it would be nice to be able to define multiple-column uniqueness constraints such as in MySql:

      UNIQUE KEY 'userId_2' ('userId','customerId')

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                jporche Joe P
              • Votes:
                14 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: