I'm currently using the doctrine 2.2 DQL to create my queries against the
entities within doctrine.  I've created a nice simple wrapper which allows
me to do:

$s = new Search();
$results =
$s->select("u")->from("User","u")->where("u","age","<",20)->execute();

That is a wrapper for performing something like:
$this->getDQB()->getQuery()->getResult();

Where $this->getDQB() is the Doctrine Query Builder and getResult() returns
an array of entities.

When i try and use Paginate ( shipped with Doctrine 2.2 ) i have to do the
following:

$query = $this->getDQB()->getQuery()
                ->setFirstResult($this->getStart())
                ->setMaxResults($this->getLimit());

$results = new Paginator($query, $fetchJoin = false);

The issue is that $results is now a paginate object and not an array of
entities.  

How can i get the actual results from the paginate object, i really do not
want to have to iterate over the resultset to get the paginated entities.

I need this because i return a 

new Search_Result() 

when i perform execute() and currently the values returned by paginate do
not fit with my current application.

Thanks for all and any help with this.





-----
... or is it me?
--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Doctrine-2-2-Paginator-Get-results-and-not-Query-tp4543413p4543413.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to