[CLOSED] Selecting single relationship attribute with Query.select returns all relationships
- 0
- Databases
1.4.2 I have collection with 3 relationships. I want to select only one of them but appwrite always returns all relationships.
select([\"$id\",\"$createdAt\",\"$updatedAt\",\"$permissions\",\"mediaThumbnail.$id\"])
returns (Sorry! dart map - should be understandable)
0 = {map entry} "$id" -> "64fe3b5ca83a1f7f0757"
1 = {map entry} "$createdAt" -> "2023-09-10T21:55:40.691+00:00"
2 = {map entry} "$updatedAt" -> "2023-09-10T22:34:16.739+00:00"
3 = {map entry} "$permissions" -> [_GrowableList]
4 = {map entry} "assignedToCategories" -> [_GrowableList]
5 = {map entry} "content" -> [_GrowableList]
6 = {map entry} "mediaThumbnail" -> [_Map]
7 = {map entry} "$databaseId" -> "main_database"
8 = {map entry} "$collectionId" -> "content_entry"
I selected mediaThumbnail relation, but content and assignedToCategories are returned as well
in comparison this select:
select([\"$id\",\"$createdAt\",\"$updatedAt\",\"$permissions\"])
returns
0 = {map entry} "$id" -> "64fe3b5ca83a1f7f0757"
1 = {map entry} "$createdAt" -> "2023-09-10T21:55:40.691+00:00"
2 = {map entry} "$updatedAt" -> "2023-09-10T22:34:16.739+00:00"
3 = {map entry} "$permissions" -> [_GrowableList]
4 = {map entry} "$databaseId" -> "main_database"
5 = {map entry} "$collectionId" -> "content_entry"
It because queries are not available in relationship at the moment
[CLOSED] Selecting single relationship attribute with Query.select returns all relationships
Recommended threads
- DB connection | Got timeout reading comm...
When looking at the logs of `appwrite-mariadb` I'm seeing a lot of: ``` 2026-04-09 7:37:28 10 [Warning] Aborted connection 10 to db: 'appwrite' user: 'appwrit...
- Invalid document structure: Unknown attr...
Environment: Dart version: 3.5.1 dart_appwrite: 13.0.0 I’ve already created the database structure using a Dart function. I can create data records using cloud...
- Help with nameservers
I just added our domain, and as per instruction in the page following, it says, "Add the following nameservers on your DNS provider. ..." I want to keep my cu...