In unversioned feature classes, we can control privileges through Catalog for SELECT, INSERT, UPDATE, DELETE (using any combination).
However, with versioned feature classes, we can only control INSERT, UPDATE, and DELETE as a group (all-or-nothing).
We can't allow INSERTS and UPDATES, yet prevent DELETES.
It would be great if we could prevent just DELETES in versioned feature classes.
Thanks!
CREATE OR REPLACE TRIGGER D202574_custom
BEFORE INSERT ON D202574
FOR EACH ROW
DECLARE
v_upd_row NUMBER;
BEGIN
SELECT COUNT(1) INTO v_upd_row
FROM A202574
WHERE objectid = :new.sde_deletes_row_id
AND sde_state_id = :new.deleted_at;
IF v_upd_row = 0 THEN
raise_application_error(-20001, 'Deleting has been disabled via a custom trigger.');
END IF;
END ;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.