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

Entity-to-String converters can generate empty String

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.1.RELEASE
    • Fix Version/s: 1.2.2.RELEASE
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      1. Run this script:
        project --topLevelPackage rootest
        jpa setup --provider HIBERNATE --database H2_IN_MEMORY
        
        entity jpa --class ~.domain.model.Thing
        
        entity jpa --class ~.domain.model.Ownership
        
        entity jpa --class ~.domain.model.Owner
        
        entity jpa --class ~.domain.model.Person
        
        focus --class ~.domain.model.Thing
        field string --fieldName name --notnull
        field set --fieldName ownerships --type ~.domain.model.Ownership
        
        focus --class ~.domain.model.Ownership
        field date --fieldName effectiveFrom --type java.util.Date
        field date --fieldName effectiveTo --type java.util.Date
        field reference --fieldName owner --type ~.domain.model.Owner
        field reference --fieldName thing --type ~.domain.model.Thing
        
        focus --class ~.domain.model.Owner
        field reference --fieldName party --type Person
        field set --fieldName ownerships --type ~.domain.model.Ownership
        
        focus --class ~.domain.model.Person
        field string --fieldName firstName --notnull
        field string --fieldName surname --notnull
        
        web mvc setup
        web mvc all --package ~.web
      2. Create a Person, Owner, and Thing
      3. Open the "Create Ownership" form. The "Owner" drop-down contains one item with a blank label.

      The cause and a workaround are explained in the above forum entry.

      We should change the MVC addon to generate a more useful String for an entity that has no displayable fields.

        Attachments

          Activity

            People

            Assignee:
            aswan Andrew Swan
            Reporter:
            aswan Andrew Swan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: