
Did you make any changes to the collection or attributes after creating this relationship?

I may have deleted it and recreated (on an empty collection)

That could be the problem

Ideally this attribute should have been deleted too

Is there a work-around to delete the document - in this current state?

Is deleting the collection and recreating it from scratch the only solution?

What's the current value for the attribute?

I didn't get you. what do you mean by value
?

What's the result of getDocument?

empty list []

You might have to go directly into the database to delete it then

I'm not sure if this is an issue from the way I'm configuring or may be it should be documented as to how the relationships can be cleaned up. The other table gives this error:
[Error] Message: Unknown column 'object' in 'field list'

What I mean is - I'm not sure if I should be reporting this as a bug?

@Drake ^^

This issue persists even when both the collections are created from scratch and the relationships added.

what's yoour code and what are your collections (as JSON)?

Table 1
{
"$id": "654c9bc06a5b9d7a7c8d",
"name": "feed_activities",
"enabled": true,
"documentSecurity": false,
"attributes": [
{
"key": "name",
"type": "string",
"status": "available",
"error": "",
"required": false,
"array": false,
"size": 64,
"default": null
},
{
"key": "result",
"type": "string",
"status": "available",
"error": "",
"required": false,
"array": false,
"size": 524288,
"default": null
},
{
"key": "notify",
"type": "boolean",
"status": "available",
"error": "",
"required": false,
"array": false,
"default": null
},
{
"key": "actor",
"type": "relationship",
"status": "available",
"error": "",
"required": false,
"array": false,
"relatedCollection": "654c9aa06a5b9e7a7c8c",
"relationType": "manyToMany",
"twoWay": true,
"twoWayKey": "activities",
"onDelete": "setNull",
"side": "parent"
},
{
"key": "object",
"type": "relationship",
"status": "available",
"error": "",
"required": false,
"array": false,
"relatedCollection": "65570c6420b88746ea8d",
"relationType": "oneToMany",
"twoWay": true,
"twoWayKey": "activities",
"onDelete": "cascade",
"side": "child"
}
],
"indexes": []
}

Table 2
{
"$id": "65570c6420b88746ea8d",
"$permissions": [
"read(\"users\")"
],
"name": "feed_objects",
"enabled": true,
"documentSecurity": true,
"attributes": [
{
"key": "type",
"type": "string",
"status": "available",
"error": "",
"required": false,
"array": false,
"size": 16,
"default": "Object"
},
{
"key": "name",
"type": "string",
"status": "available",
"error": "",
"required": false,
"array": false,
"size": 32,
"default": null
},
{
"key": "actor",
"type": "relationship",
"status": "available",
"error": "",
"required": false,
"array": false,
"relatedCollection": "654c9aa06a5b9e7a7c8c",
"relationType": "oneToMany",
"twoWay": false,
"twoWayKey": "65570c6420b88746ea8d",
"onDelete": "setNull",
"side": "parent"
},
{
"key": "activities",
"type": "relationship",
"status": "available",
"error": "",
"required": false,
"array": false,
"relatedCollection": "654c9bc06a5b9d7a7c8d",
"relationType": "oneToMany",
"twoWay": true,
"twoWayKey": "object",
"onDelete": "cascade",
"side": "parent"
}
],
"indexes": [
]
}

I'm not using any code - just using appwrite web console to add/remove. Add works fine. But delete throws errors.

What are you doing exactly?

I have 2 tables that have this 2 way relationships - Object has activities and activity belongs to an object.
When I create an object, I also add zero or more activities. When I try to delete the obejct
it throws the error I have mentioned in the summary of this discussion.


I was able to successfully add and remove (link/unlink) documents as well as delete documents without any error 🧐

could the problem be with the 3rd relationship you have?

I'll try removing the 3rd relationship and check.
Recommended threads
- JSON and Object Support in Collection do...
I am working with Next.Js and Appwrite Cloud, I am relatively New to Appwrite but i have noticed there is no direct support of JSON and Object support in attrib...
- list() is very slow; eventually shows no...
When I use the web browser to view the collections in my database, the documents they contain are normally displayed within a few seconds. For a few days now, h...
- Can't start docker containers beacuse no...
Hi, I'm testing my app where I upload also files to appwrite storage. As I suspect, I've filled up my disk. Now I can't start Appwrite. Could I ask for help wit...
