DDC-3016: Criterias do not work with embeddables when matching in memory #3783

doctrinebot opened this Issue Mar 7, 2014 · 1 comment

2 participants


Jira issue originally created by user mnapoli:

When using criterias and doing the matching on a collection already loaded in memory, it will not work if filtering on embeddable objects.


    $criteria = new Criteria();
    $criteria->andWhere($criteria->expr()->eq('actions.view', true));

    $authorizations = $this->authorizations->matching($criteria);

Here the ClosureExpressionVisitor will try to get the property named ->actions.view instead of ->actions->view.

PHPUnit*Framework_Error*Notice : Undefined property: Tests\...\Model\ArticleAuthorization::$actions.view

Comment created by mnapoli:

I have opened a PR with a potential fix: doctrine/collections#27

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment