[Solved] Getting general_unknown error while updating document relationship.
- 0
- Resolved
- 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
- MariaDB refuses to connect to appwrite
Earlier, I tried updating my Appwrite version from 18.1.x to the latest release because my Flutter package required it to function properly. I used the official...
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.