Skip to content

Conversion problem with annotations #3102

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

Open
markosrial opened this issue May 5, 2025 · 2 comments
Open

Conversion problem with annotations #3102

markosrial opened this issue May 5, 2025 · 2 comments
Labels
status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged

Comments

@markosrial
Copy link

markosrial commented May 5, 2025

Having the next @Query

@Query("""
            {
                "terms": {
                  "isbn": ?0
                }
            }
            """)
    @SourceFilters(includes = "isbn")
    Set<BookISBN> getExistentIsbns(List<String> isbns);

the result ends with the next exception:

target = {ConversionFailedException@10466} "org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.util.ArrayList<?>] to type [@org.springframework.data.elasticsearch.annotations.Query @org.springframework.data.elasticsearch.annotations.SourceFilters java.util.Set<com......BookISBN>] for value [[...]]"
 sourceType = {TypeDescriptor@12899} "java.util.ArrayList<?>"
 targetType = {TypeDescriptor@12900} "@org.springframework.data.elasticsearch.annotations.Query @org.springframework.data.elasticsearch.annotations.SourceFilters java.util.Set<com.....BookISBN>"

Seems a bad combination when using projections and anotations.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 5, 2025
@sothawo
Copy link
Collaborator

sothawo commented May 5, 2025

Please provide a minimal compilable and runnable example to reproduce this.

@sothawo sothawo added the status: waiting-for-feedback We need additional information before we can continue label May 5, 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 May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants