I'm trying to get a list of documents with the following code:
const lastQueries = [Query.orderDesc("date"), Query.limit(1), Query.equal("profile", profile.$id)];
const lastMarkin = await databases.listDocuments<MarkinProps>(DATABASE_INTERNAL, "markin", lastQueries);
And I get this error:
appwrite | [Error] Timestamp: 2023-08-28T16:38:52+00:00
appwrite | [Error] Method: GET
appwrite | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents
appwrite | [Error] Type: PDOException
appwrite | [Error] Message: Unknown column 'profile' in 'where clause'
appwrite | [Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
appwrite | [Error] Line: 64
This happens only when I add Query.equal("profile", profile.$id).
The markin collection have this attributes: workday (relationship), profile (relationship), date and isComputed and a unique index for the date attribute.
I have tried, recreating the markin collection but I keep having the same error
I'm on appwrite v1.3.7 node-appwrite v9.0.0
I haven't migrating recently, it was working before.
The only recently change was to add markin relational attribute to a workday
Any clue on how to solve this?
I don't think you can query relationship fields
Yeah you're right, I totally forgot that! 😅
[CLOSED] Unknown column 'profile' in 'where clause'
Recommended threads
- HUGE OUTRAGE IN APPWRITE, I CANNOT ACCES...
I have 2k users trying to access, sending me messages. What am I supposed to do? Please solve this asap.
- All my apps are not opening now
All my apps are not opening now 200+ apps are not opening plz fast
- Failed to generate functions SSL
```appwrite-worker-certificates | Cannot renew domain (functions.domain.com) on attempt no. 9 certificate: Failed to verify domain DNS records. appwrite-worker...