Back

relationship missing data on load (key)

  • 0
  • Self Hosted
  • Flutter
  • Databases
Kuromory
2 Jul, 2024, 14:30

I have created a collection with multiple relationships, but one when I load it I don't get the field of it in my Map... Is this a bug or did I miss something? I have also relationships in relationships is this a problem? funny thing is from the 3 relationship in the object I only miss one of them...

TL;DR
Issue: Missing data for one relationship field on load. When deleting `relationshipA`, other relationships (`relationshipB` and `relationshipC`) are not sent. This problem occurs when having both manyToMany and manyToOne connections to the same collection, where the manyToOne fields are ignored. Nested relationships may also cause issues. Solution: This could be a bug related to JSON serialization or data retrieval logic. Check the serialization process for handling multiple relationships. It's advised to revise the data loading mechanism to ensure all relationships are fetched correctly.
Kuromory
2 Jul, 2024, 14:30

relationship missing data on load (key)

Kuromory
2 Jul, 2024, 14:50

I did some digging and found out that when I have a manyToMany and a manyToOne connection to the same collection it gets only the manyToMany fields and the manyToOne are ignored...

Kuromory
2 Jul, 2024, 14:52
TypeScript
{
"relationshipA": ["collectionAId"], // shown/sent
"relationshipB": "collectionAId" // ignored/not sent
"relationshipC": "collectionAId" // ignored/not sent
}
Kuromory
2 Jul, 2024, 14:54

when I delete the relationshipA the others are sent...

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