Skip to content

Loading…

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

Open
doctrinebot opened this Issue · 1 comment

2 participants

@doctrinebot

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.

Example:

    $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
@doctrinebot

Comment created by mnapoli:

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

@beberlei beberlei was assigned by doctrinebot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.