src-db/database/model/triggers/AD_TABLE_MOD_TRG.xml
changeset 6500 cbe25f0abf2c
parent 6498 6b8d9ce301fd
child 6702 690d2af86089
equal deleted inserted replaced
6499:e2616479f44e 6500:cbe25f0abf2c
    97     RAISE_APPLICATION_ERROR(-20533, 'Cannot insert/delete objects in a module not in development.');
    97     RAISE_APPLICATION_ERROR(-20533, 'Cannot insert/delete objects in a module not in development.');
    98   END IF;
    98   END IF;
    99   
    99   
   100   --Check the only updated column is isFullyAudited. In this case maitin updated
   100   --Check the only updated column is isFullyAudited. In this case maitin updated
   101   --column as it was to prevent changes detection when trying to update database
   101   --column as it was to prevent changes detection when trying to update database
   102   IF (UPDATING AND 
   102   IF (UPDATING) THEN
   103       COALESCE(:NEW.ISACTIVE             ,'.') = COALESCE(:OLD.ISACTIVE             ,'.') AND                                                                                                                                                                            
   103     IF (COALESCE(:NEW.ISACTIVE             ,'.') = COALESCE(:OLD.ISACTIVE             ,'.') AND                                                                                                                                                                            
   104       COALESCE(:NEW.NAME                 ,'.') = COALESCE(:OLD.NAME                 ,'.') AND                                                                                                                                                                            
   104       COALESCE(:NEW.NAME                 ,'.') = COALESCE(:OLD.NAME                 ,'.') AND                                                                                                                                                                            
   105       COALESCE(:NEW.DESCRIPTION          ,'.') = COALESCE(:OLD.DESCRIPTION          ,'.') AND                                                                                                                                                                            
   105       COALESCE(:NEW.DESCRIPTION          ,'.') = COALESCE(:OLD.DESCRIPTION          ,'.') AND                                                                                                                                                                            
   106       COALESCE(:NEW.HELP                 ,'.') = COALESCE(:OLD.HELP                 ,'.') AND                                                                                                                                                                            
   106       COALESCE(:NEW.HELP                 ,'.') = COALESCE(:OLD.HELP                 ,'.') AND                                                                                                                                                                            
   107       COALESCE(:NEW.TABLENAME            ,'.') = COALESCE(:OLD.TABLENAME            ,'.') AND                                                                                                                                                                            
   107       COALESCE(:NEW.TABLENAME            ,'.') = COALESCE(:OLD.TABLENAME            ,'.') AND                                                                                                                                                                            
   108       COALESCE(:NEW.CLASSNAME            ,'.') = COALESCE(:OLD.CLASSNAME            ,'.') AND                                                                                                                                                                            
   108       COALESCE(:NEW.CLASSNAME            ,'.') = COALESCE(:OLD.CLASSNAME            ,'.') AND                                                                                                                                                                            
   122       COALESCE(:NEW.TREETYPE             ,'.') = COALESCE(:OLD.TREETYPE             ,'.') AND                                                                                                                                                                            
   122       COALESCE(:NEW.TREETYPE             ,'.') = COALESCE(:OLD.TREETYPE             ,'.') AND                                                                                                                                                                            
   123       COALESCE(:NEW.ACCTDATE_COLUMN_ID   ,'.') = COALESCE(:OLD.ACCTDATE_COLUMN_ID   ,'.') AND                                                                                                                                                                            
   123       COALESCE(:NEW.ACCTDATE_COLUMN_ID   ,'.') = COALESCE(:OLD.ACCTDATE_COLUMN_ID   ,'.') AND                                                                                                                                                                            
   124       COALESCE(:NEW.ACCTCLASSNAME        ,'.') = COALESCE(:OLD.ACCTCLASSNAME        ,'.') AND
   124       COALESCE(:NEW.ACCTCLASSNAME        ,'.') = COALESCE(:OLD.ACCTCLASSNAME        ,'.') AND
   125       :NEW.ISFULLYAUDITED != :OLD.ISFULLYAUDITED) THEN
   125       :NEW.ISFULLYAUDITED != :OLD.ISFULLYAUDITED) THEN
   126          :NEW.UPDATED := :OLD.UPDATED;
   126          :NEW.UPDATED := :OLD.UPDATED;
       
   127     END IF;
   127   END IF;
   128   END IF;
   128 END AD_TABLE_MOD_TRG
   129 END AD_TABLE_MOD_TRG
   129 ]]></body>
   130 ]]></body>
   130     </trigger>
   131     </trigger>
   131   </database>
   132   </database>