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

exception is thrown when more than 9 FilterGroups #122

Closed
Aschalin opened this issue May 13, 2024 · 2 comments · Fixed by #123
Closed

exception is thrown when more than 9 FilterGroups #122

Aschalin opened this issue May 13, 2024 · 2 comments · Fixed by #123
Assignees
Labels
bug Something isn't working

Comments

@Aschalin
Copy link

example:

SOQL.of(Account.SObjectType)
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('1')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('2')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('3')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('4')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('5')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('6')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('7')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('8')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('9')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('0')))
.whereAre(SOQL.FilterGroup.add(SOQL.Filter.with(Account.Name).contains('a')))
.preview()
.toList();

preview result:
14:35:31:000 USER_DEBUG WHERE (Name LIKE :v1) AND (Name LIKE :v2) AND (Name LIKE :v3) AND (Name LIKE :v4) AND (Name LIKE :v5) AND (Name LIKE :v6) AND (Name LIKE :v7) AND (Name LIKE :v8) AND (Name LIKE :v9) AND (Name LIKE :v1)0 AND (Name LIKE :v1)(Name LIKE :v1)
Screenshot 2024-05-13 at 14 39 57

expected preview result:
14:35:31:000 USER_DEBUG WHERE (Name LIKE :v1) AND (Name LIKE :v2) AND (Name LIKE :v3) AND (Name LIKE :v4) AND (Name LIKE :v5) AND (Name LIKE :v6) AND (Name LIKE :v7) AND (Name LIKE :v8) AND (Name LIKE :v9) AND (Name LIKE :v10) AND (Name LIKE :v11)

exception:
Screenshot 2024-05-13 at 14 44 17

@pgajek2 pgajek2 self-assigned this May 13, 2024
@pgajek2 pgajek2 linked a pull request May 13, 2024 that will close this issue
@pgajek2 pgajek2 added the bug Something isn't working label May 13, 2024
@pgajek2
Copy link
Member

pgajek2 commented May 13, 2024

Hi @Aschalin ,

Here is the fix: #123

@pgajek2
Copy link
Member

pgajek2 commented May 13, 2024

@Aschalin code on the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants