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

Creates N queries for hydrateMany #9

Open
xtrinch opened this issue Mar 12, 2021 · 2 comments
Open

Creates N queries for hydrateMany #9

xtrinch opened this issue Mar 12, 2021 · 2 comments

Comments

@xtrinch
Copy link

xtrinch commented Mar 12, 2021

This package creates one query per item for hydrateMany, and that is very slow as it would do 50 separate queries for 50 items that you want to hydrate.

It should make one query for all entities and then just map the result to the entities you want to hydrate.

@jspizziri
Copy link
Contributor

I think it should either do that OR execute 1 query per entity type.

@bashleigh , any thoughts on this? I'd potentially be interested in working on a PR if you were on board.

@bashleigh
Copy link
Owner

@jspizziri Yes please do! That would've been a much better solution! Can't remember why I did each programatically! There's also an issue surrounding the calling to the database on the child->parent side that you might be able to resolve at the same time. The conditions I made seem to always favour the wrong relationship

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