Re: [zeta-dev] Persistent object vs DB Query

2011-01-03 Thread Maxime Thomas
I finally did it with a $q->groupBy() and it's working with the PO session. The only thing I cannot do is what you've described (due to $q->select ()). Thank you anyway for the way to correctly doing the count (I was doing like this already but wondering if it was possible to do it with the PO sess

Re: [zeta-dev] Persistent object vs DB Query

2011-01-03 Thread Petar Å panja
Hi Maxime, PO fetches table rows through id fields, and it makes no sense to do distinct on id field, ids should be unique. Also you can't make count query through PO session. To add this functionality you should add a method in the query layer to transform your query to count query (modify select

[zeta-dev] Persistent object vs DB Query

2010-12-29 Thread Maxime Thomas
Hi Zetadev, A quick question for those using ezcPersistentObject and the standard ezcPersistentSessionINstance::createFindQuery(). I'm a bit stuck with that code : $s = ezcPersistentSessionInstance::get(); $q = $s->createFindQuery("className"); ... $s->find($q, 'className'); How can I make d