From: Rafael Kitover Date: Thu, 20 May 2010 14:28:18 +0000 (+0000) Subject: support INSERT OR UPDATE triggers for Oracle X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc42fa9ac80f921b0f835fbd3bd9088e3d1d14c9;p=dbsrgits%2FDBIx-Class-Historic.git support INSERT OR UPDATE triggers for Oracle --- diff --git a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm index c832536..0b83e26 100644 --- a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm +++ b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm @@ -85,7 +85,7 @@ sub _dbh_get_autoinc_seq { { $schema ? (owner => $schema) : (), table_name => $table || $source_name, - triggering_event => 'INSERT', + triggering_event => { -like => '%INSERT%' }, status => 'ENABLED', }, ); diff --git a/t/73oracle.t b/t/73oracle.t index 0aa3ee7..a9ee688 100644 --- a/t/73oracle.t +++ b/t/73oracle.t @@ -87,7 +87,7 @@ $dbh->do(qq{ }); $dbh->do(qq{ CREATE OR REPLACE TRIGGER cd_insert_trg - BEFORE INSERT ON cd + BEFORE INSERT OR UPDATE ON cd FOR EACH ROW BEGIN IF :new.cdid IS NULL THEN