We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How can I truly delete a record that has set softdelete?

I began to start phalcon framework recently.
This framework is awesome!
But, I have a quiestion about ORM.
How can I truly delete a record that has set softdelete?



15.1k
edited Apr '14

Ha, that's a good question. Maybe try directly with PHQL? (or SQL)

Hmm... ORM Do not have "forcedelete" function? I think I ought to implement the forcedelete.



125.8k
Accepted
answer

In your model, set up the delete() function to just do a soft delete. Then you can add an actualDelete() function that calls parent::delete().

Thankyou! I deceide that use this solution.