Back

Unable to delete documents with relationships

  • 0
  • Databases
Zeke(Jafesu)
9 Oct, 2023, 04:01

When i try to delete a document that has relationships (without anythin actually related to the document, just has the attribute) I get a Server 500 error.

Appwrite log:

TypeScript
[Error] Method: DELETE
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
[Error] Type: Error
[Error] Message: Call to a member function getId() on null
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
[Error] Line: 3834```

If I add a relationship then it will let me delete, should be able to delete without relationship too

v1.4.2
TL;DR
Users are experiencing issues when trying to delete documents with relationships. When attempting to delete a document without any actual relationships, a Server 500 error occurs. Adding a relationship allows for successful deletion. This issue is present in version 1.4.2 of the software.
Drake
15 Oct, 2023, 02:38

Does this happen on 1.4.5 too?

Zeke(Jafesu)
15 Oct, 2023, 02:42

I haven't tried it, found it was only doing it on 1x1 relations, none with many

Zeke(Jafesu)
15 Oct, 2023, 02:42

so i got rid of my 1x1 relationships

Drake
15 Oct, 2023, 03:07

Interesting...it might be good to create an issue for this...

Drake
15 Oct, 2023, 03:07

I swear we tested this before, but maybe there was a regression...

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more