How to debug dependent=>destroy being ignored?

Hi,

I have a has_many :children, :dependent=>:destroy association. For some reason, when I delete the parent, the children are not destroyed.

In the log, I can see the parent being deleted, but nothing related to the child table is shown. I do use the association to create entries in the child table.

How do I debug this problem?

Thanks,

David

dtrusty@my-deja.com wrote:

Hi,

I have a has_many :children, :dependent=>:destroy association. For some reason, when I delete the parent, the children are not destroyed.

In the log, I can see the parent being deleted, but nothing related to the child table is shown. I do use the association to create entries in the child table.

How do I debug this problem?

Thanks,

David

I found the cause of this problem. If I call the Parent.delete with a set of ID's, it doesn't delete the children. I must do a Parent.destroy for the children to be deleted.

David