Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kunicmarko20/61ee343147fd06596911319761e52871 to your computer and use it in GitHub Desktop.
Save kunicmarko20/61ee343147fd06596911319761e52871 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