From 56ff937833b6e5e9d73060b801e629b58f6a2311 Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 11 Jan 2007 22:38:35 +0000 Subject: [PATCH] fixed lazy-connecting for transaction methods --- lib/Doctrine/Db.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Doctrine/Db.php b/lib/Doctrine/Db.php index 2e9676fb9..20a515fc5 100644 --- a/lib/Doctrine/Db.php +++ b/lib/Doctrine/Db.php @@ -422,6 +422,8 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte */ public function beginTransaction() { + $this->connect(); + $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::BEGIN); $this->listener->onPreBeginTransaction($event); @@ -439,6 +441,8 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte */ public function commit() { + $this->connect(); + $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::COMMIT); $this->listener->onPreCommit($event);