How can I query the āNoteā class (see picture below) for the ACL: "role: āGroup2ā. So when I query through the Note class I want to filter out Objects with a specific role.
Here is a picture of the Notes class.
So normally if I want to query for the objectId I do the following thing and it works:
async function querySomething(objectId) {
const Notes = Moralis.Object.extend("Note");
const query = new Moralis.Query(Notes);
query.equalTo("objectId", objectId);
const results = await query.find();
console.log(results[0].get('content'))
}
But I donāt know how to query ACL. When I try I this Iām getting an error:
async function querySomething(roleName) {
const Notes = Moralis.Object.extend("Note");
const query = new Moralis.Query(Notes);
query.equalTo("ACL", roleName);
const results = await query.find();
console.log(results[0].get('content'))
}
Error:
querySomething("Group1")
Promise {<pending>}
moralis.js:26280
POST https://hb8ozxaq1hib.usemoralis.com:2053/server/classes/Note 400
moralis.js:26416 Uncaught (in promise) Error: Cannot query on ACL.
at handleError (moralis.js:26416:17)
at async querySomething (wallet.html:121:29)