rlee128Original post
Rank 2: Process
When trying to load a nested relationship using the below query I get this error: Invalid query: Attribute not found in schema: *
Dart
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 []; }Summary
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.