Closed marcelloh closed 7 years ago
I think you can do something like this, right? Somebody correct me If I'm wrong.
$mapper -> $spot->mapper('Entity\Posts');
$posts = $mapper->where('status IN' => ['published', 'draft'], 'year IN' => ['2015', '2016']);
Sound like a very good solution :-) I was stuck in where/andwhere/orwhere kind of things so I didn't see the obvious.
SELECT * FROM posts WHERE (status = 'published' OR WHERE status = 'draft') AND (year = 2016 OR year =2015) AND (....)
I try to find it in the documentation, or figure out doing it in the software... but it's unclear to me for now.