[Solved] Getting general_unknown error while updating document relationship.
- 0
- Databases
- Flutter
- Cloud
I have two collections Match & Score with one-to-one two way relationship. I am able to create Match document with nested score document perfectly fine (The link between Match to Score is working) When i fetch the score document i am not able to get the match document because Score to Match link is not present.
So i thought i have to create the Score to Match link manually. Now when i try to create link by updating score document with match document id inside of it. appwrite is throwing general_unknown error. I am stuck because i don't know how to debug this situation.
I have provided screenshot of my code, It is throwing error when i try to update score document. The update Match document call is working fine.
Correct me If I am wrong:
You try to get the Score Document but there is no data for Match linked on this specific document?
Yes exactly and it will be not there obviously because in appwrite console that score document's match field is empty.
So i thought that i need to set it now if i try to set it using above code i am getting general_unknown exception
The problem could be Permission Security related
You have to enable the create permission on the Collection Level
Then the other permission such as read, update and delete you can enable it either Collection or Document level it depends on you
Also, I donβt think Relationships are fully stable yet? Might not be your fault at all.
I have checked permission in both collections ,I have given all permission to all users of the app for both the collections ,i think it should work and not have to be a permission issue.
What's your project ID?
6505612ba995ac771cdd
Match is a one to one? If so, you should not be passing an array π§
Thank you @Steven for this, I tried to do this previously but it was not working (Maybe due to some error from my side) Now it is working fine.
[Solved] Getting general_unknown error while updating document relationship.
Recommended threads
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- Appwrite console is too heavy
The Appwrite console is too heavy And all of my services broken Any support , please
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...