I have a scope named users and in this scope I have two collections. clients and vendors. How can I query all documents inside both clients and vendors collection by only specifying the scope.
Something like SELECT * FROM
test.
users;
gives me Ambiguous reference to field test.
.
You can’t do that directly.
If you’re familiar with RDBMSes, then scopes are analogous to an RDBMS schema… and you couldn’t select from just a schema.
You might find this a useful reference:
You can get all the documents using a UNION selecting all documents from both collections, e.g.
SELECT * FROM test.users.clients
UNION ALL
SELECT * FROM test.users.vendors;
HTH.