doctrine/mongodb-odm — pull request #667 by jmikola (2013-08-29 20:43:11+00:00)
Title: Combine filter/mapping criteria with $and instead of array_merge()

Supersedes #654.

This is a behavior change for ODM. Filter and mapping criteria (e.g. for inverse references) will now be merged with existing criteria via `$and`. This avoids inadvertently overwriting existing criteria, but also means it's possible for conflicting criteria to appear in separate `$and` clauses and prevent results from being returned. Based on discussion in #654, this was deemed to be the safest option.

/cc @superdweebie @j @jwage