Spring Roo
  1. Spring Roo
  2. ROO-1041

Roo Spring MVC scaffolding support for JPA custom primary keys

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: 1.1.0.M2
    • Fix Version/s: 1.1.1.RELEASE
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      Controller scaffolding from this Entity with a primary key of type string currently results in a

      javax.el.PropertyNotFoundException: Property 'id' not found on type dk.prispiraten.domain.TSecurityquestion
      	at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
      	at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170)
      	at javax.el.BeanELResolver.property(BeanELResolver.java:279)
      	at javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
      	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
      	at org.apache.el.parser.AstValue.getValue(AstValue.java:123)
      	at org.apache.el.parser.AstDynamicExpression.getValue(AstDynamicExpression.java:42)
      	at org.apache.el.parser.AstCompositeExpression.getValue(AstCompositeExpression.java:47)
      	at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
      	at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935)
      	at org.apache.jsp.tag.web.form.fields.table_tagx._jspx_meth_spring_005furl_005f0(table_tagx.java:811)
      

      where the actual property should be 'securityquestionId' for the entity listing page

        Issue Links

          Activity

          Hide
          Stefan Schmidt added a comment -

          I have renamed this ticket to 'Roo Spring MVC scaffolding support for JPA custom primary keys' since this is a new feature currently not supported by Roo. I also edited the issue type to be 'new feature' rather than 'bug' given this feature was never supported.

          To make this new feature work a number of changes to the Roo bean info metadata model need to be in place. Therefore, this will not be addressed in the upcoming 1.1.0.M2 release.

          Show
          Stefan Schmidt added a comment - I have renamed this ticket to 'Roo Spring MVC scaffolding support for JPA custom primary keys' since this is a new feature currently not supported by Roo. I also edited the issue type to be 'new feature' rather than 'bug' given this feature was never supported. To make this new feature work a number of changes to the Roo bean info metadata model need to be in place. Therefore, this will not be addressed in the upcoming 1.1.0.M2 release.
          Hide
          Stefan Schmidt added a comment -

          Copying over the script to reproduce as reported in ROO-1071:

          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

          Show
          Stefan Schmidt added a comment - Copying over the script to reproduce as reported in ROO-1071 : 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
          Hide
          Enrique Ruiz (DiSiD) added a comment -

          I think this issue is the same than https://jira.springframework.org/browse/ROO-1105

          Show
          Enrique Ruiz (DiSiD) added a comment - I think this issue is the same than https://jira.springframework.org/browse/ROO-1105
          Hide
          Stefan Schmidt added a comment -

          Enrique. Good pickup! I just tried the script above to reproduce and it does not display any problems against the current Roo trunk. So this has been fixed as part of ROO-1105. I'll go ahead and close.

          Show
          Stefan Schmidt added a comment - Enrique. Good pickup! I just tried the script above to reproduce and it does not display any problems against the current Roo trunk. So this has been fixed as part of ROO-1105 . I'll go ahead and close.

            People

            • Assignee:
              Stefan Schmidt
              Reporter:
              An Dams
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: