Skip to content

Predicate fails with message: Unsupported operator IN [DATALDAP-62] #82

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
spring-projects-issues opened this issue Feb 22, 2018 · 1 comment
Labels
status: ideal-for-contribution An issue that a contributor can help us with type: bug A general bug

Comments

@spring-projects-issues
Copy link

spring-projects-issues commented Feb 22, 2018

Alex opened DATALDAP-62 and commented

I have a POJO class that contains LDAP attributes. The class is annotated with @Entry annotation. The entity has some fields as a collection (i.e. Set<String>) but most of the POJO fields are just String values.
When I try to use LdapRepository's findAll method with Predicate to search through multi-valued fields with using Collection.contains(...) method the spring-data-ldap throws the exception:

java.lang.UnsupportedOperationException: Unsupported operator IN
at org.springframework.data.ldap.repository.support.LdapSerializer.visit(LdapSerializer.java:108)
at org.springframework.data.ldap.repository.support.LdapSerializer.visit(LdapSerializer.java:37)
at com.querydsl.core.types.OperationImpl.accept(OperationImpl.java:83)

I was able to trace the problem and it looks like when Collection type of an attribute is used for a Predicate's query then QueryDSL provides IN operation which is not supported by Spring's LdapSerializer class.
Here is the sample of the Predicate:

QPerson person = QPerson.person;
return person.studentAliases.contains(alias).or(person.employeeAliases.contains(alias));

Is it possible to add support for IN operation same way as EQ operator so DATA-LDAP module processes multi-valued attributes without any issues?


No further details from DATALDAP-62

@spring-projects-issues spring-projects-issues added type: bug A general bug status: ideal-for-contribution An issue that a contributor can help us with labels Dec 30, 2020
@nemogpt
Copy link

nemogpt commented Mar 14, 2025

Could someone assign this to me if it's still a priority to resolve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ideal-for-contribution An issue that a contributor can help us with type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants