Back

[SOLVED] Empty Relationships

  • 0
  • Apple
hartix10000
9 Nov, 2023, 21:58

I'm using a many to many relationship in a collection called Classes (relationship to a collection called Teachers). I have a teacher in a particular document, but it appears empty in the document.

["teachers": AnyCodable([[]]), "$createdAt": AnyCodable("2023-10-29T17:32:35.505+00:00"), "$id": AnyCodable("1"), "description": AnyCodable("How to fix iPhones"), "title": AnyCodable("iPhone Fixing"), "$updatedAt": AnyCodable("2023-11-07T21:21:33.373+00:00"), "$collectionId": AnyCodable("1"), "students": AnyCodable([]), "$databaseId": AnyCodable("1"), "$permissions": AnyCodable(["read("team:1")", "update("team:1")"])]

I can't seem to update the document in code either. Thoughts?

TL;DR
User is experiencing an issue with empty relationships in their document. They have tried turning document security off and on, but the issue persists. Another user suggests that the problem may be due to permissions. The affected document has a many-to-many relationship with the Teachers collection, but the teacher appears empty in the document. The user provides a code snippet of the document's data. No solution has been mentioned yet.
hartix10000
9 Nov, 2023, 21:58

Empty Relationships

Drake
10 Nov, 2023, 19:18

perhaps the user doesn't have permissions to the related collection/documents?

hartix10000
10 Nov, 2023, 20:28

Hmm odd. Just to check. I turned document security off. Added it back and now I can see it. Very strange. Thanks for the thought.

Drake
10 Nov, 2023, 21:54

[SOLVED] Empty Relationships

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