Do you talk beauty?
I'm doing an infinite category system, so in the table has the code and code of the parent category. I would like to relate these two fields to when I delete a category the child is deleted too, so I do not need to treat via code.
But how do I do this? Because you imagine that the parent code needs to be registered and if the category is the highest level it will not have parent, giving the key error.
Thank you.