
When trying to load a nested relationship using the below query I get this error: Invalid query: Attribute not found in schema: *
TypeScript
try {
final queries = <String>[
Query.select(['*', 'accounts.*, accounts.owner_id.*']),
Query.orderDesc('\$createdAt'),
Query.limit(limit),
];
if (cursor != null && cursor.isNotEmpty) {
queries.add(Query.cursorAfter(cursor));
}
final response = await tableDBSignal.value!.listRows(
databaseId: Constants.dbID,
tableId: Constants.transactionsDB,
queries: queries,
);
return response.rows.map((doc) => Transactions.fromMap(doc.data)).toList();
} on AppwriteException catch (e) {
log('Error fetching transactions: ${e.message}, ${e.code}');
return [];
}
TL;DR
Issue: Error message "Invalid query: Attribute not found in schema" when attempting to load nested relationships in a query.
Solution: Ensure that the attributes referenced in the nested relationship query are correctly specified in the schema. Double-check that the attributes like 'accounts' and 'owner_id' are properly defined in the schema to avoid this error.Recommended threads
- Getting Error On self host SSL update
Hi, I am using app write for my app backend version i am using is 1.6.2 yesterday my ssl is expired and now i am not able to renew it because of it my app is no...
- Function Cannot be deleted
I think this shouldn't happen!
- CORS Issue | DID NOT FIND ANYTHING ON DO...
Hello There, I get the Error ```Access to fetch at 'https://fra.cloud.appwrite.io/v1/account' from origin 'http://localhost:5173' has been blocked by CORS poli...
