-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Behavior breaking change deserializing property with null value #4571
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
Thank you for reporting! Do you by any chance have a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem? That would help us quite a bit triaging the issue. |
I don't but I'll spend some time on it |
Would it be enough if I told you that the difference happens in MappingMongoConverter#readProperties ? |
@pierre-gautier Thanks again for bringing this to our attention! |
Thanks for your answer. |
We should have introduced this change much earlier as the change is more honest. You can always intercept values in a constructor or, if you use Alternatively, you can make use of lifecycle events to post-process the |
Using spring-data-mongodb 4.1.5, when deserializaing a property with null value in database to an instanciated collection, the collection was not set to null.
With version 4.2.0, the collection is set to null.
While I do understand the intention and tends to be aligned with it, it's still a breaking change that may have numerous impacts in production.
WDYT ?
The text was updated successfully, but these errors were encountered: