8

is there a way to use the findAll() function with conditions?

I want to do something like

->findAll('active'=1);

I know that i can write custom repository classes but just for a simple "where-condition" I thought there is an easier way.

0

1 Answer 1

23

You can use findBy:

$objects = $yourRepo -> findBy(array('key' => $value ));
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.