Forum OpenACS Development: Re: Cannot delete groups with segments and rels
acs_permissions where object_id = v_object_id".
If you want "on delete cascade" to Do the Right Thing in general with acs_objects (perhaps a worthwhile goal...), that's a different and larger issue. AFAIK it is currently not supported by the OpenACS object system.
On the the deleting groups problem above, yup, sounds to me like a similar patch needs to be made there. It's the other end of the same problem actually, when you delete an acs_object you need to delete the permissions granted on that object. Likewise when you delete a group which has permissions on some object, you need to delete those granted permissions before deleting the group too...