Forum OpenACS Development: Re: Cannot delete groups with segments and rels

Collapse
Posted by tammy m on
Hi

Well the good news is I applied your patch and deleting groups now works except when I've already assigned permissions to the group or its rel_segs. Then I get ERROR: acs_permissions_grantee_id_fk referential integrity violation - key in parties still referenced from acs_permissions.

Maybe acs_group__delete could add code to drop permissions first? Or a delete cascade on group and rel_segs? I haven't found a way to mass delete permissions yet, only permission::revoke.

Am I missing something more obvious here?

Collapse
Posted by Randy O'Meara on
Tammy, where in the sequence are you seeing the permissions RI error? What does your code look like? What call are you using the zap the group?

I've seen a few other forums discussions regarding cascading deletes. There are some that think the data model is seriously flawed because it doesn't do enough of that. I wouldn't expect a suggestion in that direction to be accepted without a great deal of...