I am trying to create a Forum that lists its Topics in a tree structure. I use the following Doctrine 2 (for mysql) to store topic information.
class ForumTopic extends \Kdyby\Doctrine\Entities\BaseEntity
{
public $id;
...
public $parentTopic_id;
Each topic has its own identifier and can be a child. If so, it is stored in parentTopic_id. It works, but whenever I try to delete a topic, this error appears.
I tried adding onDelete = "cascade" to the line with "joinColumn", but that didn't help. How to fix it, so I can delete any topic?
EDIT:
Sorry for the delay in answering, I had Christmas to celebrate and stuff :-). On this screen you can see the data in the table in accordance with the requests.
