diff --git a/Doctrine/View.php b/Doctrine/View.php index 0d11413e1..698365caa 100644 --- a/Doctrine/View.php +++ b/Doctrine/View.php @@ -37,8 +37,8 @@ class Doctrine_View { * * @param Doctrine_Query $query */ - public function __construct(Doctrine_Query $query) { - $this->name = get_class($this); + public function __construct(Doctrine_Query $query, $viewName) { + $this->name = $viewName; $this->query = $query; $this->query->setView($this); $this->dbh = $query->getSession()->getDBH(); diff --git a/manual/docs/Basic Components - Query - DQL - SQL conversion.php b/manual/docs/Basic Components - Query - DQL - SQL conversion.php index 5fcb1dbe0..3abe47a33 100644 --- a/manual/docs/Basic Components - Query - DQL - SQL conversion.php +++ b/manual/docs/Basic Components - Query - DQL - SQL conversion.php @@ -64,7 +64,7 @@ to use column aggregation inheritance even in the subquery.

+
  • Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. The transfer of funds can be completed or it can fail for a multitude of reasons, but atomicity guarantees that one account won't be debited if the other is not credited as well.
  • + + + + + +- from wikipedia +

    +In Doctrine all operations are wrapped in transactions by default. There are some things that should be noticed about how Doctrine works internally: + + + diff --git a/tests/ViewTestCase.php b/tests/ViewTestCase.php index f34789380..c88a3a22c 100644 --- a/tests/ViewTestCase.php +++ b/tests/ViewTestCase.php @@ -1,12 +1,10 @@ session); $query->from('User'); - $view = new MyView($query); + $view = new Doctrine_View($query, 'MyView'); $this->assertEqual($view->getName(), 'MyView'); $this->assertEqual($view->getQuery(), $query);