[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
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Appwrite Storage error 503s for automate...
I'm facing error 503s from Appwrite after about 5-6 seconds of making AI requests from my tool with images and files above 20MB (=> not inline base64 used, but ...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...