this is the query i apply to it:
private filterQuery(query: string[], options?: GenericListOptions): string[] {
query = [
Query.orderDesc(options?.sortField || "$createdAt"),
Query.limit(options?.limit || 15),
Query.isNull("deletedAt"),
Query.select([
"$id",
"status",
"totalAmount",
"userId",
"items",
"address",
"$createdAt",
"$updatedAt",
"deletedAt",
]),
];
if (options?.status && options?.status != -2) {
query.push(Query.equal("status", options?.status));
}
if (options?.from && options?.to) {
query.push(Query.between("$createdAt", options?.from, options?.to));
}
return query;
}
are one of those attributes a relationship attribute?
yeah address and items are relational
Queries on relationships are not supported
thanks, so i guess i just have to put ItemIds and addressId As their Attribute to exclude Items And Address.
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...