We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/Janisvb/payload-reproduction/tree/filtering
Filtering on a select- or text-field with hasMany:true is not working with Postgres.
yarn dev:postgres _community
Equals filter on select-field with hasMany: false (correct) http://localhost:3000/api/posts?where[type][equals]=post
Equals-filter on select-field or text-field with hasMany: true (error) http://localhost:3000/api/posts?where[categories][equals]=ts or http://localhost:3000/api/posts?where[categories_text][equals]=ts ERROR (payload): error: syntax error at or near "="
ERROR (payload): error: syntax error at or near "="
In-filter on select-field or text-field with hasMany: true (error) http://localhost:3000/api/posts?where[categories][in]=js,ts or http://localhost:3000/api/posts?where[categories_text][in]=js,ts ERROR (payload): error: syntax error at or near "in"
ERROR (payload): error: syntax error at or near "in"
All-filter on select-field or text-field with hasMany: true (not supported) http://localhost:3000/api/posts?where[categories][all]=js,ts or http://localhost:3000/api/posts?where[categories_text][all]=js,ts ERROR (payload): TypeError: _operatorMap.operatorMap[queryOperator] is not a function
ERROR (payload): TypeError: _operatorMap.operatorMap[queryOperator] is not a function
It is working as expected with MongoDB.
2.11.1
db-postgres
The text was updated successfully, but these errors were encountered:
Hey @Janisvb - thanks for reporting this! The above has been fixed with these two PRs:
equals
not_equals
hasMany
Sorry, something went wrong.
PatrikKozak
No branches or pull requests
Link to reproduction
https://github.com/Janisvb/payload-reproduction/tree/filtering
Describe the Bug
Filtering on a select- or text-field with hasMany:true is not working with Postgres.
To Reproduce
yarn dev:postgres _community
Equals filter on select-field with hasMany: false (correct)
http://localhost:3000/api/posts?where[type][equals]=post
Equals-filter on select-field or text-field with hasMany: true (error)
http://localhost:3000/api/posts?where[categories][equals]=ts or http://localhost:3000/api/posts?where[categories_text][equals]=ts
ERROR (payload): error: syntax error at or near "="
In-filter on select-field or text-field with hasMany: true (error)
http://localhost:3000/api/posts?where[categories][in]=js,ts or http://localhost:3000/api/posts?where[categories_text][in]=js,ts
ERROR (payload): error: syntax error at or near "in"
All-filter on select-field or text-field with hasMany: true (not supported)
http://localhost:3000/api/posts?where[categories][all]=js,ts or http://localhost:3000/api/posts?where[categories_text][all]=js,ts
ERROR (payload): TypeError: _operatorMap.operatorMap[queryOperator] is not a function
It is working as expected with MongoDB.
Payload Version
2.11.1
Adapters and Plugins
db-postgres
The text was updated successfully, but these errors were encountered: