I would like to work on this issue, however I get stuck because of the following issue.
The error occurs in this line because the set of ignoredPropertyNames in the BeanDescription contains the attributes marked as read only, so the loop continues and the corresponding property is not added to the result set.
Debugging brought me to the strange behavior, you can reproduce as follows.
0. Simulate the error by including @JsonProperty(access = JsonProperty.Access.READ_ONLY) above this line
Step into the INTROSPECTOR.forDeserialization method
Step until you reach the last line with the return statement
When you evaluate desc.getIgnoredPropertyNames() here, you get an empty set.
When you make another step now, you should be back in the fromJacksonProperties method and should now have the desc instance returned to the local description variable.
I would expect that evaluating description.getIgnoredPropertyNames() now should return the same result as in step 4, however it returns a HashSet containing my two read only variables "isbn" and "title".
Can somebody explain this behavior to me or give me a heads up on how I can find the actual root of this error?
That's in place now. We're now using the Jackson serialization configuration of an entity instead of the deserialization one (the latter not including read-only properties).
I guess the reason you see those properties change is that Jackson very often defers the calculation of information until it's actually needed. Some intermediate operation might just trigger the initialization of that field