Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.6 GA (Ingalls)
-
Fix Version/s: 2.6.8 (Ingalls SR8), 3.0.1 (Kay SR1), 3.1 M1 (Lovelace)
-
Component/s: None
-
Labels:None
-
Sprint:Kay GA
Description
Moving to spring data rest Ingalls GA introduces a new problem regarding read only json properties.
We use @JsonProperty(access = READ_ONLY) to mark fields as read-only in our entities. So this field should be serialized but not deserialized.
With Ingalls a PUT request nulls such a property.
I think in a PUT should treat @JsonProperty(access = READ_ONLY) just as @JsonIgnore - so such properts is just ignored in a PUT.
I have added a test on my fork to reproduce the case: https://github.com/mduesterhoeft/spring-data-rest/commit/c46df6e66b1bfeb27f81d9e7c03e15b699f1019a