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
- SSL Certificate Failure - Using Appwrite...
When we attempt to apply our custom domain to our appwrite site, we consistently receive the following error. [23:44:49] Processing SSL certificate issuance. ...
- Regarding Rate Limits
Hello, I am a student engineer who built an internal website for my university club using AppWrite. My club currently has around 500 members, and when I recent...
- Error trying to deploy functions from CL...
✗ Error • on-auth-create (6a00b2ab000c9ce2949b) • Server Error ✗ Error: No functions were pushed. Prject ID: 69ffe0270033a4ac420a