Forum OpenACS Development: data change violation updating acs_objects

In porting static-pages this statement:
          update acs_objects set security_inherit_p = ''f'' 
                  where object_id = v_item_id;
is causing this error:
[12/Jul/2001:10:06:04][560.12293][-conn3-] Error: dbinit: error
acs-4,ERROR:  triggered data change violation on 
relation "acs_object_context_index"
In a function call to static_page__new. I don't see where acs_objects is updated anywhere else in this function call.
Posted by Dan Wickstrom on
When you do the following:

	v_item_id := content_item__new(...)

a row is inserted into acs_object_context_index via a trigger. Then later in the same transaction/function you do:

	update acs_objects set security_inherit_p = 'f' 
		where object_id = v_item_id;

which results in the same row in acs_object_context_index to be updated by a trigger - causing a data-change violation. The only work-around that I see for this is to overload content_item__new and acs_objects__new so that the item can be created with security_inherits_p set to false. If you want, you can make those changes and send me a patch. If not, I'll try and do it tonight.

Posted by Dave Bauer on
I'll give it a shot and send it to you when it's done.