I'm using Appwrite locally on version 1.4.13
I have two related collections: user_profile
and climb
. A user_profile
can have many climb
s, and a climb
can have one user_profile
.
When deleting a user_profile
I want to do a setNull
on the related climb
s.
But when doing so, I get an Appwrite "Server Error"
My appwrite.json
has this:
On the user_profile
:
{
"key": "climb",
"type": "relationship",
"status": "available",
"error": "",
"required": false,
"array": false,
"relatedCollection": "65dcb2225a080e10109f",
"relationType": "oneToMany",
"twoWay": true,
"twoWayKey": "setter",
"onDelete": "setNull",
"side": "parent"
}
On the climb
:
{
"key": "setter",
"type": "relationship",
"status": "available",
"error": "",
"required": false,
"array": false,
"relatedCollection": "65dcb0b8eb253f1b0df9",
"relationType": "oneToMany",
"twoWay": true,
"twoWayKey": "climb",
"onDelete": "setNull",
"side": "child"
}
I can work around this by manually setting the climb.setter
to null
, but this seems to be functionality the "onDelete": "setNull"
should do.
If I don't manually set the climb.setter
to null
, I can't delete the user_profile
and get the "Server Error".
Please advise how I can update my JSON to get the required functionality, or confirm if this is a bug?
Recommended threads
- OAuth session cookie is set but wont del...
I have made it so my users can log in with Github, and it does work, however when I try and get their details with account.get() I get the error ```AppwriteExce...
- Permissions must be one of: (any, guests...
Hello everyone, 👋 I'm currently experiencing a problem with my **SvelteKit** application. <:svelte:832942383062712356> I have configured my application to ha...
- appwrite-worker-usage invalid character ...
```bash root@appwrite:~# docker logs appwrite-worker-usage ... ... [Job] Received Job (6639ff2e219529.60314462). [2024-05-07 10:15:10.139] Aggregated 207 keys [...