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

Property 'id' not found when listing Domain Entities on Web Page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.1.0.M2
    • Fix Version/s: 1.1.0.M2
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      The Property 'id' is not being found on Domain Entity when user lists objects on Spring Web-based page.

      TO REPRODUCE:

      1. Execute roo
      2. Copy & paste the following roo commands

      project --type java.lang.Integerproject --topLevelPackage com.acme --projectName Acme
      persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
      entity --class ~.server.domain.Client --identifierField cliendID --identifierColumn cliendID --testAutomatically
      field string --fieldName firstName --sizeMax 25
      field string --fieldName lastName --sizeMax 25 --notNull
      field date --type java.util.Date --fieldName dateOfBirth --notNull
      controller all --package com.acme.web
      logging setup --level DEBUG

      3. Quit roo shel and start tomcat--> mvn tomcat:run
      4. Go to http://localhost:8080/Acme
      5. Insert at least one record by using Create new Client Form
      6. List all clients

      As you can see, an internal error appears. This is happening because Client entity was created with --identifierField cliendID --identifierColumn cliendID attributes.

      "entity --class ~.server.domain.Client --identifierField cliendID --identifierColumn cliendID --testAutomatically"

      It looks like the JSP is using the default property 'id' to display the information on the web page.

      See stacktrace.txt for more information.

        Attachments

        1. create new client.jpg
          create new client.jpg
          53 kB
        2. list all clients.jpg
          list all clients.jpg
          43 kB
        3. stacktrace.txt
          57 kB

          Issue Links

            Activity

              People

              Assignee:
              sschmidt Stefan Schmidt
              Reporter:
              jc-perez Juan Carlos Perez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: