Skip to content

CustomConversions issues a warning for asymmetric converters when converting from a List #3306

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
GFriedrich opened this issue May 25, 2025 · 1 comment
Assignees
Labels
type: bug A general bug

Comments

@GFriedrich
Copy link

GFriedrich commented May 25, 2025

Hey,
I've just recently updated to 4.5.0 (via the Spring Boot update to 3.5.0) and found that a new warning shows up during startup:

Registering converter from interface java.util.List to interface org.springframework.data.domain.Vector as reading
converter although it doesn't convert from a store-supported type; You might want to check your annotation setup
at the converter implementation

From what I got this was added via spring-projects/spring-data-mongodb@e8e110e by adding the new ListToVectorConverter.

So either the converter is faulty and does not work as the warning suggests or the warning is wrong and should be removed. But either way it adds confusion that something is not right.

Thanks for giving it a check.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 25, 2025
@mp911de mp911de self-assigned this May 26, 2025
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 26, 2025
@mp911de mp911de transferred this issue from spring-projects/spring-data-mongodb Jun 3, 2025
@mp911de mp911de changed the title Update to version 4.5.0 causes warnings CustomConversions issues a warning for asymmetric converters when converting from a List Jun 3, 2025
@mp911de mp911de closed this as completed in 3d08c10 Jun 3, 2025
mp911de added a commit that referenced this issue Jun 3, 2025
If the collection type is not a store-native type, we no longer issue a warn log. Converters can be registered for List or Collection types and convert into a different, non-collection type while being a support converter instead of forcing a specific write type.

This is e.g. the case for MongoDB where a List of numbers is converted to the Vector type.

Closes #3306
@mp911de
Copy link
Member

mp911de commented Jun 3, 2025

That's fixed now. Feel free to verify using the latest 3.5.1-SNAPSHOT build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants