Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for filtering Doctrine PersistentCollection instances by query #48

Open
jaikdean opened this issue Jun 1, 2016 · 2 comments

Comments

@jaikdean
Copy link

jaikdean commented Jun 1, 2016

If I have an X-to-many lazy-loaded association in Doctrine and Doctrine’s Criteria functionality to filter the associated entities, it will build and execute a query including the filters. If the associated entities were already loaded, it will filter the entities in PHP rather than running another query.

It would be super useful to have this ability in RulerZ, rather than have it load all associated entities then filter them as it does currently.

@jdeniau
Copy link
Contributor

jdeniau commented Jul 28, 2016

I've got the same "kind of" case, and I do not know really the best way to do it.

The only solution I found is to inject RulerZ on postLoad of the entity, but I think it's quite a bad practice.

@iainmckay
Copy link
Contributor

We also have this as a problem to solve in our backlog. For now we've accepted the overhead of converting the collection to an iterator and having it performed in memory.

It's not a massive issue for us right now as the part of our product that uses the rules engine is in testing and not yet being deployed to customers but that time is getting closer every day.

I'm hoping to fit this in to our next sprint at work since we think we know how to solve it. We're happy to put in the initial work and develop the solution further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants