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
- TablesDB `updateRows` returns `database_...
Hi Appwrite team! I’m seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance. **Environment** - Appwrite self-hosted `1.9.0` ...
- Updating GitHub App access throws error
Steps to reproduce - 1. Have some private repos allowed on the install access 2. New Site/Func > Connect GitHub > see the side card saying `Missing a repo` > cl...
- Update row sheet not loading
After right clicking a row header and click update, the sidebar fails to load (never-ending skeleton)