Skip to content
Back

relationship return null in self hosted appwrite 1.6

  • 0
  • Self Hosted
  • Flutter
  • Databases
Faisal7
27 Oct, 2024, 13:15

i have notification collection and their i have relationship to post and post has relationship with posttags and posttags has relationship with location collection and user collection. So when i retrieve the notification for the current user all the relations has data beside of location relation on the postTags collection. I get null for location. Does anybody know why? I already have at least read permission for any.

i am using the current appwrite sdk 13.0.0 for flutter as well.

the image 1 shows the location permission and the image 2 shows the Notification permission

TL;DR
Developers are experiencing null attributes in self-hosted Appwrite 1.6, possibly due to a limit of three nested relationships. Users are unsure about setting read permissions for the admin label. The issue may stem from explicit permissions.
ideclon
27 Oct, 2024, 17:39

It looks like label:admin doesn’t have Read Permissions? I’m not certain, but it’s very likely that permissions are explicit, so you’re explicitly denying label:admin Read permissions.

ideclon
27 Oct, 2024, 17:40

Also, though, Appwrite has a depth limit of three Relationships. I’m not quite clear on the structure from your post, but you may be hitting up against that limit.

Faisal7
27 Oct, 2024, 21:24

So its very strange. Here i have added the structure of my Notification Collection and tryed my best to explain it better.

Its probabely because of the nested relationship as you mentioned the limit of deep nested relationships has to be 3.

If this is the case what can i do to overcome this problem. and what i also dont understand is why i am getting the postCommentID and postID null as well, which is actually a String.

If their is any question about my drawing i will be happy to explain it.

Faisal7
27 Oct, 2024, 21:26

and what do you mean by label does not have read permission? How do i set for admin label the read permission? I taught when i have at least one either user or any -> read permission it should work.

ideclon
28 Oct, 2024, 03:57

Hmm, the postID and postCommentID thing is strange.

ideclon
28 Oct, 2024, 03:59

If you hadn’t referenced label:admin at all, those users would have the Read permission. But since you have, those permissions would be all the permissions those users would have. If you check the “Read” box for label:admin, they’ll have the Read permission

ideclon
28 Oct, 2024, 04:00

But I think that’s not entirely relevant here, because of the Attributes directly on this Collection which are showing up as null - that can’t be a Relationships issue, can 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