Warning: Trigger created with compilation errors.
258622May 11 2007 — edited May 11 2007Someone can help me to undestand what is the problem in this trigger?
CREATE OR REPLACE TRIGGER Relation1_insert
BEFORE INSERT ON Relation1
FOR EACH ROW
DECLARE
num number;
BEGIN
SELECT count(*) into num
FROM Entity1, Entity2
WHERE Entity1.key1=:new.key1 AND Entity2.key2=:new.key2 AND SDO_RELATE(Entity1.geometry,Entity2.geometry,'mask=disjoint')='TRUE';
IF num=0 THEN
raise_application_error(-20001,'Vincolo topologico non rispettato!')
END IF;
END;
The problem does not depend on spatial condition because if I delete it continues to to the warning.
If I try to insert a correct or an incorrect instance of the table Relation1, Oracle does me an error on the trigger.