Skip to content
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

Mapping converter not applied for ReactiveMongoTemplate::findAndReplace #4865

Open
joostfarla opened this issue Dec 31, 2024 · 3 comments
Open
Labels
status: feedback-provided Feedback has been provided

Comments

@joostfarla
Copy link

I have registered a MappingMongoConverter component to perform custom conversions for all document reads and writes. When performing find / findOne / etc. operations, this works as expected. However, when using ReactiveMongoTemplate::findAndReplace, the conversion is not applied on the returned document (the MappingMongoConverter::read method is not called). Is this expected behavior? Thanks in advance!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 31, 2024
@christophstrobl
Copy link
Member

No, the imperative and reactive templates should map from/to documents using same conversion strategies. If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.

@christophstrobl christophstrobl added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 7, 2025
@spring-projects-issues
Copy link

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Jan 14, 2025
@joostfarla
Copy link
Author

joostfarla commented Jan 14, 2025

A minimal reproducible example can be found in this repository: https://github.com/joostfarla/spring-data-mongodb-4865.
The DemoApplicationTests class demonstrates the failing and succeeding scenarios. If you need any additional information, please let me know!

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided
Projects
None yet
Development

No branches or pull requests

3 participants