Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dm = $this->get('doctrine_mongodb');
- $repo = $dm->getRepository('AcmeMyBundle:MyDocument');
- $criteria = array(
- 'field1' => 'value1',
- 'field1' => 'value1',
- );
- $logs = $repo->findBy(
- $criteria, /* criteria */
- array($field => $direction), /* sort */
- $limit, /* limit */
- (($page-1)*$limit)?:null /* skip */
- );
- $count = $repo->createQueryBuilder('MyDocument')
- ->count()->getQuery()->execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement