โ/ 6 public function findWithLimit ( $ limit = 50 , $skip = 0) 7 { 8 $qb = $this โ>createQueryBuilder () ; 9 /โโ @var Cursor $ r e s u l t โ/ 10 $ r e s u l t = $qbโ>f i e l d ( ' deleted ' )โ>notEqual ( true ) 11 โ>skip ( $skip ) 12 โ>l i m i t ( $l imit ) 13 โ>sort ( ' twitterId ' , โ1) 14 โ>getQuery () 15 โ>execute () ; 16 return $result โ>hydrate () ; 17 } Listing 16: More complex nding - part 1 5.4 Find with limit, skipping, sorting and one condition - part 2 This example is nearly the same than the previous one, beside that the eldname is dynamic and we want this eld as 'true' or 'set' (line 11). 1 /โโ 2 โ @param s t r i n g $ f i e l d 3 โ @param int $l imit 4 โ @param int $skip 5 โ @return Cursor 6 โ/ 7 public function findByBooleanFieldWithLimit ( $ f i e l d , $limit = 50 , $skip = 0) 8 { 9 $qb = $this โ>createQueryBuilder () ; 10 /โโ @var Cursor $ r e s u l t โ/ 11 $ r e s u l t = $qbโ>f i e l d ( $ f i e l d )โ>equals ( true ) 12 โ>skip ( $skip ) 13 โ>l i m i t ( $l imit ) 14 โ>sort ( ' twitterId ' , โ1) 15 โ>getQuery () 16 โ>execute () ; 17 return $result โ>hydrate () ; 18 } Listing 17: More complex nding - part 2 February 26, 2016 18 c dknx01