Hi,
I would like to translate this raw query <http://pastebin.com/EhDRcfSf>
that gives me the result i want (here <http://pastebin.com/cUrjkg4q>),
with the doctrine query builder, but I'm stuck with the time "accumulator"
that allows to group by days, month, years and so on.
I got to this point:
$this->createQueryBuilder()
->group([
'os' => '$os',
'year' => ['$year' => '$at'],
'month' => ['$month' => '$at'],
'day' => ['$dayOfMonth' => '$at'],
],
['count' => 0])
->reduce('function(doc, prev) { prev.count += 1}')
->getQuery()
->execute()
->toArray();
but what I get is just an array with all time fields to null (os and count
are correct, though).
Any tip would be really appreciated.
Thanks
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.