When using ->matching() on a PersistentCollection that is already loaded, it returns incorrect results when trying to match by id on a relationship.
// NOTE: the user property is a M:1 relationship of $entity
$c = new Criteria(Criteria::expr()->eq('user', $userId));
$res = $entity->getLikes()->matching($c);
// $res is empty, even if $userId exists