I am trying to query with a relation on it. For example:
But it don’t work:
But both of these works:
Here are some screenshots to help understand my setup:
(for some reason I cannot add more than 2 links on my post, so just add https:// to the links above)
Any idea why is not working? or what am I doing wrong?
if you are using the shipped sqlite backend (and no external DB like mongo) you are not able to filter by a collection link. The SQLite implementation uses
https://github.com/agentejo/mongo-lite which is not able to filter by field subsets
if you’re using mongodb as cockpits data source then this filter query should work:
but if you’re using the default MongoLite data source then querying nested values isn’t supported, sorry.
Filtering on a collectionlink
@serjoscha87 I simply downloaded the .zip file and ran. How can I upgrade for mongodb?
Wait I am actually a bit confused. Because I just tried in the demo this:
https://demo-api.directus.app/_/items/sales?filter[member.first_name][eq]=Osborn at it worked!
The only setup I needed to do to the default demo was to give Read permissions to the Public user group (which I also done on my local)
I am actually confused - gonna take a look into this later for the satisfaction of my own curiosity. Thanks for the hint.