Back

[SOLVED] Issue with Selecting Attributes within Nested Collections in Query Select

  • 0
  • Databases
  • Flutter
hamed
12 May, 2023, 20:23

Hello, I was able to select attributes within Collection B using 'Query. select' within a relationship with Collection A. However, I am encountering an issue with selecting attributes within Collection B after adding a third level with Collection C. The relationship now looks like Collection A -> Collection B -> Collection C, and I'm unable to select attributes within Collection B.

TL;DR
Issue: Unable to select attributes within nested collections in query select. Solution: The issue was resolved by removing the relationship between the 'review' and 'post' collections. It was found that 'Query.select' does not work on a document that has two relationships within it.
Drake
12 May, 2023, 20:37

yes, there is limited support for select at the moment. make sure to upvote this issue: https://github.com/appwrite/appwrite/issues/5376

hamed
12 May, 2023, 20:46

Thanks, but that's not the same as my issue

Drake
12 May, 2023, 21:05

What exactly are your collections and what are queries in your request?

hamed
12 May, 2023, 22:09

I have four collections: userPreview, userData, post, and review. UserPreview has a one-to-one relationship with userData and a one-to-many relationship with review. Post has a one-to-many relationship with review.

Currently, I am querying the review collection (using the post ID index) and receiving a response that includes userPreview and userData. However, I do not want userData, so I tried using Query.select on userPreview, but it doesn't seem to work. It only works when I remove the relationship between userPreview and userData.

Drake
12 May, 2023, 22:37

that sounds like the 4th task in the issue, right?

hamed
12 May, 2023, 23:18

Yes,

Drake
12 May, 2023, 23:23

right, so make sure to 👍🏼 the issue

hamed
12 May, 2023, 23:23

Alright, sure

hamed
12 May, 2023, 23:45

[SOLVED] Issue with Selecting Attributes within Nested Collections in Query Select

hamed
13 May, 2023, 12:11

It seems to work now after I removed the relationship between 'review' and 'post'. It appears to me that 'Query.select' doesn't work on a document that has two relationships within it.

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