Esempio n. 1
0
 public function getByNameAndCategory($name, $category)
 {
     $qb = new QueryBuilder($this->getClient());
     $qb->addWhere($qb->expr()->eq('name', $name))->addWhere($qb->expr()->neq('category', $category))->setMaxResults(10)->setFirstResult(0);
     $res = $qb->getQuery()->execute();
     return Collection::create('O3Co\\Query\\SampleClient\\Model', $res);
 }
Esempio n. 2
0
 public function getByNameAndCategory($name, $category)
 {
     $qb = new QueryBuilder($this->getClient());
     $qb->addWhere($qb->expr()->eq('name', $name))->addWhere($qb->expr()->neq('category', $category))->setMaxResults(10)->setFirstResult(0);
     $res = $qb->getQuery()->execute();
     return $res['data'];
 }