This code works fine:
TypeScript
const doc = await databases.getDocument("main", "users", account.$id, [
Query.select(["premium"]),
]);
But this code throws an error:
TypeScript
const doc = await databases.getDocument("main", "users", account.$id, [
Query.select(["premium", "albums"]),
]);
``` where "albums" is a relationship attribute
The error:
```json
{
"code": 500,
"type": "general_unknown",
"response": {
"message": "Server Error",
"code": 500,
"type": "general_unknown",
"version": "1.5.3"
}
}
And in the logs:
TypeScript
[Error] Method: GET
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
[Error] Type: Utopia\Database\Exception
[Error] Message: Cannot select attributes: albums
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
[Error] Line: 5249
TL;DR
Error occurs when trying to fetch a document with a relationship query including the "albums" attribute. Server throws a 500 error indicating "Cannot select attributes: albums".Relationship query attribute causes server error.Recommended threads
- Export, Import or Migration giving this ...
As you can see in yhe screenshot i am not able to export any data or export the data from tables. Also it is affecting the migration from appwrite to appwrite h...
- local (self-hosted) sites issues
setup: - `composer run installer:dev` issues - Getting error when visiting the site ```Synchronous function execution timed out. Use asynchronous execution in...
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...