Hi,
I’m trying to query a collection to return only records with a matching _owner value.
This is a snippet from the backend function:
const {items} = await wixData.query('Survey')
.eq('_owner', ownerId)
.descending('_updatedDate')
.find();
It always returns zero rows.
ownerId is a string, the _owner field on the Collection says it’s a string. (ownerId is passed into the function as a parameter)
If I query on any other field on the collection it works fine, so that should rule out authorisation issues. Just _owner has a problem being queried.
What am I missing?
thanks