[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
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...