Spring Roo
  1. Spring Roo
  2. ROO-2357

Error with the generated code in *Roo_Controller.aj, *Roo_DataOnDemand.aj and *Roo_IntegrationTest.aj when an entity class extends an other entiy class

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Complete
    • Affects Version/s: 1.1.3.RELEASE
    • Fix Version/s: 1.1.4.RELEASE
    • Component/s: @ CORE, TESTING, WEB MVC
    • Labels:
      None

      Description

      The code generated with in the aspectJ files has a mix of problems that mean that the project will not compile, for example with in the controller it is calling the mothod findAllPolicys from the parent class rather than calling findAllMotorPolicys, and this is then generating a type conversion error as the List<MotorPolicy> is what is expected but List<Policy> is what is being returned. This is also happening in the IntegrationTest aspects and DataOnDemand. The other issue is that in the DataOnDemand aspects the set methods used to propulate the data is being set with the parameters of ( Policy , int ) rather than ( MotorPolicy, int ). I will attach some of the class and aspect files from the project to show examples as to what is happening.

      1. metadata status with Controllers.txt
        5 kB
        David Wilkinson
      2. metadata status without Controllers.txt
        5 kB
        David Wilkinson
      3. MotorPolicy.java
        2 kB
        David Wilkinson
      4. MotorPolicyDataOnDemand_Roo_DataOnDemand.aj
        16 kB
        David Wilkinson
      5. MotorPolicyDataOnDemand.java
        0.3 kB
        David Wilkinson
      6. Policy.java
        7 kB
        David Wilkinson

        Issue Links

          Activity

          Hide
          James Tyrrell added a comment - - edited

          In commit 14f0468e892c0477ad5ffbb5f2354f82f6c64dfe the underlying issue where the the most concrete type isn't tagged has been resolved.

          Show
          James Tyrrell added a comment - - edited In commit 14f0468e892c0477ad5ffbb5f2354f82f6c64dfe the underlying issue where the the most concrete type isn't tagged has been resolved.
          Hide
          Alan Stewart added a comment -

          Appears to be a regression bug as there were no errors in 1.1.1 and 1.1.2. Please test. Thanks

          Show
          Alan Stewart added a comment - Appears to be a regression bug as there were no errors in 1.1.1 and 1.1.2. Please test. Thanks
          Hide
          David Wilkinson added a comment -

          I have just got the latest source code out of GIT and I am testing it at the moment and so far everything is looking very good. looking at the generated code all the classes and methods are as I would expect them to be.

          Show
          David Wilkinson added a comment - I have just got the latest source code out of GIT and I am testing it at the moment and so far everything is looking very good. looking at the generated code all the classes and methods are as I would expect them to be.
          Hide
          Alan Stewart added a comment - - edited

          That's good news (so far!). Unrelated I noticed in your pom that you have AspectJ at 1.6.10. I would update it to 1.6.11.

          Show
          Alan Stewart added a comment - - edited That's good news (so far!). Unrelated I noticed in your pom that you have AspectJ at 1.6.10. I would update it to 1.6.11.
          Hide
          Alan Stewart added a comment -

          Closing for now. Can be reopened if there is still a problem

          Show
          Alan Stewart added a comment - Closing for now. Can be reopened if there is still a problem

            People

            • Assignee:
              Alan Stewart
              Reporter:
              David Wilkinson
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: