Back

Select related collection attributes and id

  • 0
  • Self Hosted
  • Databases
BeT
16 Oct, 2024, 11:25

I know that queries on relations are not supported. But u can select some attributes of a related collection like this [Query.select([ "$id", "name", "articles.name", "articles.description"])], This returns me specified attributes but if I add article.$id it doesnt work. It only works if select only article.$id. Is there any way or workaround to fetch id AND some attributes?

TL;DR
Developers want to select specific attributes from a related collection in a query, but including the ID along with other attributes causes issues. A workaround is to select the ID separately from the other attributes, as combining them in the query does not seem to be supported.
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