Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.7
-
None
-
None
Description
The @ToString annotation only includes properties that are directly declared on the current class, and not any properties that are inherited. I have a small hierarchy of Spring Data @Documents that inherit from a common abstract base (with ID, status key, and the like), and it is most natural for the @ToString to include all properties, not just the ones declared on the concrete classes. includeSuper is a usable workaround but awkward because the base class is never instantiated and splitting the properties up is a bit confusing.
It would be helpful to be able to tell @ToString to include inherited properties when generating the toString().