Created
March 22, 2018 12:38
-
-
Save ostrolucky/16fe6e07536eb64211bb1691c258a685 to your computer and use it in GitHub Desktop.
AssociationHydrator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bendavies [1:22 PM] | |
@iltar we use this to solve this problem: https://github.com/SyliusLabs/AssociationHydrator | |
use it like so (edited) | |
https://github.com/Sylius/Sylius/blob/0205d4b3efa155a05b29bcc64849fd7cd460ceea/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php#L300-L313 | |
iltar [1:31 PM] | |
That will still cause queries, won't it? | |
bendavies [1:35 PM] | |
it does what is suggested in ocramius' post | |
multi step hydration | |
more queries but far less hydration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment