-
Notifications
You must be signed in to change notification settings - Fork 180
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
Applying filter for type Array field #441
Comments
Seems like the issue is that the column is created as type
|
@agnes512, you were looking into filters recently. Could you please help? Thanks. |
Hi, could you try to specify the
After you do |
Hi, following your suggestion the column does have datatype |
@radsal I checked the package, and you are right, PostgreSQL connector doesn't support filtering on arrays, see #342. I thought the operator I believe it's a valid use case, not sure how much effort it needs tho D: For other filters, we currently added these pages under Querying data. |
For anyone would like to contribute: the where filter and also its For example, to return instances that its array contains any provided values in the filter, the connector currently uses For such cases for arrays, the SQL should be |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
Steps to reproduce
Create a model with property type array:
e.g:
Insert some records.
Try to filter the record: {where: { propertyKey: "somevalue"}}
Current Behavior
It doesn't return any records for the filter.
However, using
loopback-connector-mongodb@5.2.3
package returns the desired response.Expected Behavior
It should return matching records.
Link to reproduction sandbox
https://github.com/radsal/loopback-sandbox
Additional information
darwin x64 10.19.0
loopback@3.27.0
loopback-boot@3.3.1
loopback-component-explorer@6.5.1
loopback-connector-mongodb@5.2.3
loopback-connector-postgresql@5.0.1
Related Issues
See Reporting Issues for more tips on writing good issues
strongloop/loopback#4272
The text was updated successfully, but these errors were encountered: