Back

1.3 Database Relationship Selection Functionality

  • 1
  • Databases
Tanner Meade
18 Apr, 2023, 16:52

With the new update for db relationships, how can I select only the main collection documents and still get the IDs of the child docs?

Is it possible to select a relationship attribute and not get the env var level deep of relations?

TL;DR
There is a request for the functionality of selecting specific database relationships, as discussed in this GitHub issue: https://github.com/appwrite/appwrite/issues/5376. The user is asking for the ability to select only the main collection documents while still retrieving the IDs of the child documents. They are wondering if it is possible to select a relationship attribute without getting the environment variable level relationships. A solution or response from the community is not mentioned in the thread.
Argel
16 May, 2023, 04:20

Yeah, that would be great to have this option, for example in a Query.select(['todos.$id']) or in other ways.

Example return value with query: Query.select(['name, todos.$id'])

TypeScript
Project {
  name: 'project",
  todos: [
    'docId1',
    'docId2',
  ]
}

It is crucial to my project to use the Relationship feature.

Argel
16 May, 2023, 04:28

But this is already discussed here:

https://github.com/appwrite/appwrite/issues/5376

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more