1
0
mirror of synced 2025-02-01 13:01:45 +03:00

fixed lazy-connecting for transaction methods

This commit is contained in:
zYne 2007-01-11 22:38:35 +00:00
parent 86ec08c331
commit 56ff937833

View File

@ -422,6 +422,8 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte
*/ */
public function beginTransaction() public function beginTransaction()
{ {
$this->connect();
$event = new Doctrine_Db_Event($this, Doctrine_Db_Event::BEGIN); $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::BEGIN);
$this->listener->onPreBeginTransaction($event); $this->listener->onPreBeginTransaction($event);
@ -439,6 +441,8 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte
*/ */
public function commit() public function commit()
{ {
$this->connect();
$event = new Doctrine_Db_Event($this, Doctrine_Db_Event::COMMIT); $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::COMMIT);
$this->listener->onPreCommit($event); $this->listener->onPreCommit($event);