From 29ce606beb8062de7284bebe776bcd439b681de5 Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 6 Nov 2006 18:25:39 +0000 Subject: [PATCH] added createQuery --- lib/Doctrine/Table.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index f34c3f4f2..c3635d44c 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -270,6 +270,16 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->repository = new Doctrine_Table_Repository($this); } + /** + * createQuery + * creates a new Doctrine_Query object and adds the component name + * of this table as the query 'from' part + * + * @return Doctrine_Query + */ + public function createQuery() { + return Doctrine_Query::create()->from($this->getComponentName()); + } /** * getRepository *