This commit is contained in:
parent
755316c3fc
commit
486375f844
@ -88,13 +88,12 @@ class Doctrine_Export_Firebird extends Doctrine_Export
|
||||
$table = $this->conn->quoteIdentifier($table, true);
|
||||
$name = $this->conn->quoteIdentifier($name, true);
|
||||
|
||||
$triggerSql = 'CREATE TRIGGER ' . $trigger_name . ' FOR ' . $table . '
|
||||
ACTIVE BEFORE INSERT POSITION 0
|
||||
AS
|
||||
BEGIN
|
||||
IF (NEW.' . $name . ' IS NULL OR NEW.' . $name . ' = 0) THEN
|
||||
NEW.' . $name . ' = GEN_ID('.$sequence_name.', 1);
|
||||
END';
|
||||
$triggerSql = 'CREATE TRIGGER ' . $trigger_name . ' FOR ' . $table
|
||||
. ' ACTIVE BEFORE INSERT POSITION 0 AS'
|
||||
. ' BEGIN'
|
||||
. ' IF (NEW.' . $name . ' IS NULL OR NEW.' . $name . ' = 0) THEN'
|
||||
. ' NEW.' . $name . ' = GEN_ID('.$sequence_name.', 1)'
|
||||
. ' END';
|
||||
$result = $this->conn->exec($triggerSql);
|
||||
|
||||
// TODO ? $this->_silentCommit();
|
||||
@ -549,4 +548,4 @@ class Doctrine_Export_Firebird extends Doctrine_Export
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user