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

@RooToString - Add ability to ignore properties

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.0.M2
    • Fix Version/s: 1.1.0.RC1
    • Component/s: GENERAL OBJECTS
    • Labels:
      None

      Description

      I really think this feature is needed and it can be accomplished very easily without interfering with the current functionality.

      Basically, I see 3 approaches:

      1. An optional exclusion parameter to the annotation.

      @RooToString(ignoreProperties={"pets"})
      class Owner
      

      2. An additional annotation similar to @JsonIgnoreProperties
      (org.codehaus.jackson.annotate.JsonIgnoreProperties). This is probably too redundant for its purpose as 1. accomplishes the same thing and would not require an additional tag.

      @RooToString
      @RooToStringIgnoreProperties({"pets"})
      class Owner
      

      3. An additional annotation similar to @JsonIgnore
      (org.codehaus.jackson.annotate.JsonIgnore) This annotation would be placed above any property you want ignored.

      @RooToString
      class Owner {
      	String name
      
      	@RooToStringIgnore
      	Set<Pet> pets
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                sdmurphy Scott Murphy
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: