I have a one to one relationship between "userInfo" and "money". I tried to update money document but I am getting this error "Invalid document structure: Missing collection attribute $collection"
It looks like the collectionId in the nested userInfo is money by mistake (You can see from the screenshot).
Here is my code:
const moneyData = await database.getDocument("eserica","money", id);
moneyData.sycee -= computeCompanyCost(level);
database.updateDocument("eserica", "money", id, moneyData)
I am on npm: appwrite@12.0.0, docker: appwrite@1.3.8.
Invalid document structure: Missing collection attribute $collection
Nevermind, I realized I am only supposed to pass in the field to be updated.
so do you still have a problem?
Nope, it's solved.
[SOLVED] Invalid document structure: Missing collection attribute $collection
Recommended threads
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...
- Courtesy limit reset for non-profit migr...
Hi Team! I'm the architect for a 501(c)(3) non-profit project (Aaria's Blue Elephant) and we just hit our Free plan Database Read limit (currently at 164%). Th...