Hello.
How do I properly remove things from the database?
Can you just delete a thing, or do you need to additionally “remove” this thing from the lists in which it is present (in another table)?
Hello.
How do I properly remove things from the database?
Can you just delete a thing, or do you need to additionally “remove” this thing from the lists in which it is present (in another table)?
Hi there, @kovtun… when you delete a thing, that thing is automatically removed from any lists in which it exists, so you don’t need to add workflow actions to remove it from those lists before you delete it.
Hope this helps.
Best…
Mike
Thanks for the clarification.
I ran into a situation when, for example, such a query returns “1” even when the list is empty (visually):
While I was able to fix it as follows:
And since Now it is clear that the “removal” is not necessary, then the question remains, what is the cause of the problem. It seems that references to the “thing” were removed from the list, but when the last one was deleted, an empty string remained in the list. And the counter counted it and returned “1”.
Perhaps this is somehow connected with the fact that in my case the “thing” was present in two different lists.
I just did a quick test, and I got a count of 0 on a list when the only thing in the list was removed from the list by deleting the thing itself. I wouldn’t think your result had anything to do with the thing being present in two lists because it would be deleted from both lists. It’s hard to say what could have caused the behavior you saw without seeing your exact setup and digging into it.
In other cases, everything also works for me normally, but it was in this case that I encountered such a problem. Tried everything. Only the “remove” from all lists of things before Delete Thing helped.
As for i have read till date on bubble forums the thing does not get removed from the lists at least for the purpose of count.
Did you actually test it yourself? I tested it 2 years ago and I tested it again about 2 minutes ago, and deleting a thing that is part of a list removes the thing from the list and decreases the list count by 1.