Update on Cascade Oracle with composite primary key

0
create or replace TRIGGER cascade_update

    AFTER UPDATE OF project_name ON PROJECT
    FOR EACH ROW
    BEGIN

      UPDATE VEHICLE
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE VELOCITY_LIMIT
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE ENERGY
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE GEAR
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE THROTTLE
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE REGIME
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE NETWORK
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE ROAD
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE TOLL
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE SECTION
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

       UPDATE LOCAL
       SET project_name = :new.project_name
       WHERE project_name = :old.project_name;

    END;

.

create or replace PROCEDURE UPDATE_Project(old_name Project.project_name%type, project_name2 Project.project_name%type, project_description2  Project.project_description%type)
    IS

    BEGIN
    UPDATE PROJECT
    SET project_name = project_name2,
    project_description = project_description2
    WHERE project_name = old_name;

    END;

I need to update the project_name field that is in all tables, but when I execute the procedure I created, it presents these errors. I would love to know the best solution for updating all fields.

SEVERE: ORA-02292: integrity constraint (FKROAD185752) violated - found child registry

ORA-06512: in CASCADE_UPDATE, line 27

ORA-04088: error during trigger execution 'CASCADE_UPDATE'

ORA-06512: in "UPDATE_PROJECT", line 5

ORA-06512: on line 1

    
asked by anonymous 09.01.2018 / 18:13

0 answers