-
Notifications
You must be signed in to change notification settings - Fork 562
@JsonIgnoreProperties("filed") annotations are not respected by NestedEntitySerializer [DATAREST-1236] #1596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Robson Farias commented Hi, just a small correction, the Jackson annotation is |
Phil Webb commented Robson Farias Thanks, I've edited the description |
Oliver Drotbohm commented Hm, I'm not sure the serializer is the place to fix this. TBCH, I wouldn't even have expected the serializer to be triggered for a property that's marked as ignored as I assumed Jackson to calculate the list of properties to serialize first and only trigger serializers for the ones that survive the filtering. I'd have to check whether our custom |
Brian Strom commented This one has been out for a while and seems to be understood pretty well. Any chance of getting some attention to it? JsonIgnoreProperties is a particularly helpful annotation. (to me at least!) |
deftdawg commented I've spent a couple of days trying to figure out why fields marked as JsonIgnoreProperties like this: @ManyToOne
@JsonIgnoreProperties(value = "myclass", allowSetters = true)
private Company customer; are effectively attempting to serialize my entire database and return it in the JSON value in my ResponseEntity. |
any progress on this, this is very random that it works in one project for me while it does not in the other, the target property i am try to ignore is of type Set. |
Phil Webb opened DATAREST-1236 and commented
Originally raised as a spring boot issue along with a project that shows the issue it appears that the
@JsonIgnoreProperties("field")
annotation is currently being ignored by Spring Data Rest.After a bit of digging I think it is due to the custom
NestedEntitySerializer
. Specifically this line which serializes the value without providing Jackson access to the field annotations1 votes, 6 watchers
The text was updated successfully, but these errors were encountered: