From 486375f8445b012feca70a53b2d838e8529042c6 Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 29 Oct 2007 22:57:32 +0000 Subject: [PATCH] --- lib/Doctrine/Export/Firebird.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/Doctrine/Export/Firebird.php b/lib/Doctrine/Export/Firebird.php index 58ca03f56..69d5f9625 100644 --- a/lib/Doctrine/Export/Firebird.php +++ b/lib/Doctrine/Export/Firebird.php @@ -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; } -} \ No newline at end of file +}