Spring Roo
  1. Spring Roo
  2. ROO-303

Uppercase field names not working with scaffold

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.RC2
    • Fix Version/s: 1.0.0.RC3
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      Execute the following script (note the uppercase letter in the field name):

      project --topLevelPackage org.test.rootask
      persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
      entity --name ~.domain.Task
      field string Name
      controller all --package ~.web

      Run it and browse to: http://localhost:8080/rootask/task/form

      It throws an error:

      org.springframework.beans.NotReadablePropertyException: Invalid property 'Name' of bean class [org.test.rootask.domain.Task]: Bean property 'Name' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

      This code works:
      project --topLevelPackage org.test.rootask
      persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
      entity --name ~.domain.Task
      field string name
      controller all --package ~.web

        Issue Links

          Activity

          Hide
          Ben Alex added a comment -

          Stefan, this looks like an issue in a web-related runtime component to me as opposed to in Roo itself. ROO-203 fixed case management for property metadata and therefore your JSPs and controllers are building successfully. Therefore it would be appreciated if you could dig into this and confirm the precise location of the issue. If it turns out uppercase field names are unsupported due to web-related runtime expectations, we probably should raise an enhancement request to prevent the field commands from allowing creation of a field starting with an uppercase letter.

          Show
          Ben Alex added a comment - Stefan, this looks like an issue in a web-related runtime component to me as opposed to in Roo itself. ROO-203 fixed case management for property metadata and therefore your JSPs and controllers are building successfully. Therefore it would be appreciated if you could dig into this and confirm the precise location of the issue. If it turns out uppercase field names are unsupported due to web-related runtime expectations, we probably should raise an enhancement request to prevent the field commands from allowing creation of a field starting with an uppercase letter.
          Hide
          Stefan Schmidt added a comment -

          Hi Matt,

          While I don't feel very comfortable with breaking the convention that all bean field names should start with lower case letters, I have made the appropriate changes which enable this for the scaffolding of artifacts.

          Please try it out and let me know if you encounter any issues with the changes I made. The change is available as of revision 351.

          -Stefan

          Show
          Stefan Schmidt added a comment - Hi Matt, While I don't feel very comfortable with breaking the convention that all bean field names should start with lower case letters, I have made the appropriate changes which enable this for the scaffolding of artifacts. Please try it out and let me know if you encounter any issues with the changes I made. The change is available as of revision 351. -Stefan

            People

            • Assignee:
              Stefan Schmidt
              Reporter:
              Matt Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: