Uploaded image for project: 'Spring Data REST'
  1. Spring Data REST
  2. DATAREST-1006

PUT nulls Json read-only property

    XMLWordPrintable

    Details

    • 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

        Attachments

          Activity

            People

            Assignee:
            olivergierke Oliver Drotbohm
            Reporter:
            mduesterhoeft Mathias D
            Last updater:
            Spring Issues Spring Issues
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: