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

Spring roo incorrectly modified JPA annotation


    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.5.RELEASE
    • Fix Version/s: None
    • Component/s: @ ROO SHELL
    • Labels:
    • Environment:
      osx 10.10 (Yosemite)


      I'm calling a stored procedure where I calculate a derived value (the distance to a venue from users current location) and attempt to store it in a JPA record object. I have been able to get the code to work successfully as described in this question

      I managed to do this by disabling the Spring Roo shell and then manually updating the annotation before recompiling my project.

      However when I'm writing this logic in the spring source tool suite running a Roo shell, the Roo runtime always updates the annotation from this:

      @SqlResultSetMapping(name = "findVenuesByDistanceMapping", entities =

      { @javax.persistence.EntityResult(entityClass=model.VenueRecord.class) }

      , columns =

      { @javax.persistence.ColumnResult(name="distance") }


      To this:

      @SqlResultSetMapping(name = "findVenuesByDistanceMapping", entities =

      { @javax.persistence.EntityResult(model.VenueRecord.class) }

      , columns =

      { @javax.persistence.ColumnResult("distance")}


      You'll notice that it has removed the annotation attribute identifiers. Then when I try to compile the class I get an exception. It seems there is no way to get around this unless I move away from Spring Roo completely. This would be disappointing as I've been using it for months and only recently found an issue I couldn't seem to work around.




            • Assignee:
              eruiz Enrique Ruiz (DiSiD)
              mcnabbd David McNabb
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: