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

Work out QueryObject::preFetch() #162

Open
fprochazka opened this issue Feb 12, 2015 · 4 comments
Open

Work out QueryObject::preFetch() #162

fprochazka opened this issue Feb 12, 2015 · 4 comments
Labels
Milestone

Comments

@fprochazka
Copy link
Member

Ref #124

@stekycz
Copy link
Contributor

stekycz commented Feb 12, 2015

The idea is to preload ids of root entity and other data which can be used for easier filtering. The doCreateQuery method should return only one query related to root entity you want. It could include a lot of joined relations which means complicated query. Some relations can be loaded in postFetch now however some filtering conditions could be very complicated. Take a look on an example.

A want to filter some entities by 8 parameters. The relations are defined so I need them joined in the main query. However filtering parameters are defined only on a part of these. For example on 3 entities from 10 joined entities. The conditions could be complicated and related to performance it could be better to select only ids of root entity (and, if needed, ids of some joined relations). It is very simple to build main query then.

I know this is useful for 1 % of all use cases however I would like to use it :-)

@fprochazka
Copy link
Member Author

I would also, but I still think the api should be slightly different :)

@stekycz
Copy link
Contributor

stekycz commented Feb 12, 2015

What do you miss in there? Or what should be pasted in? The query?

@fprochazka
Copy link
Member Author

I was thinking you should get the configured query, so you can modify it.

@fprochazka fprochazka added this to the v4.0 milestone May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants