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
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Upsert with setting permissions
Hi there, I am using self-hosted appwrite v1.7.4 and trying to use the bulk update stuff that was released with 1.7.x. Unfortunally I found that there is an ser...
- Github connection error - Self Hosted Ap...
I am trying to connect my github account to deploy a project to sites, but Connect to Gtihub button is disabled. I have configured all Env variables needed for...