Hide
on 2/9/06

If you use MPTT tables anywhere (The cake acl system uses it) you may have found that when you delete an entry, the lft and rght fields for the neighouring nodes don't get updated. This may have rather dire concequences ;)

There is an open ticket for how to delete from the cake acl tables, but as it is potentially quite generic, I thought I'd include the (potential) fix here. Below are two versions of a delete method, one takes care of associations, and the other doesn't:

[Code]

Should anybody use this and find it causes a problem please let me know.

on 2/9/06

A long time ago, I took to using elements as shown in the paste below.

[Code]

I hope the time I spent trying to figure this out is saved for others :)