Skip to content

Reject saving collection like entities (Lists, Iterator,...) via MongoTemplate.save #3576

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

Closed
wants to merge 2 commits into from

Conversation

christophstrobl
Copy link
Member

This PR makes sure to fail early when attempting to save a collection like object via one of the save methods of MongoTemplate. This avoids error in the mapping layer trying to convert eg. a list into a Document.

Closes: #3570

mp911de pushed a commit that referenced this pull request Mar 2, 2021
mp911de added a commit that referenced this pull request Mar 2, 2021
Update Javadoc.

Closes #3570.
Original pull request: #3576.
@mp911de mp911de added this to the 3.2 RC1 (2021.0.0) milestone Mar 2, 2021
@mp911de mp911de closed this Mar 2, 2021
@mp911de mp911de deleted the issue/3570 branch March 2, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect class casting cause ClassCastException when save java.util.Collection using MongoTemplate
2 participants