Skip to content

Instantly share code, notes, and snippets.

@ostrolucky
Created March 22, 2018 12:38
Show Gist options
  • Save ostrolucky/16fe6e07536eb64211bb1691c258a685 to your computer and use it in GitHub Desktop.
Save ostrolucky/16fe6e07536eb64211bb1691c258a685 to your computer and use it in GitHub Desktop.
AssociationHydrator
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