Created
July 15, 2015 09:13
-
-
Save psaunders88/2b653d8d6abc28fd59f7 to your computer and use it in GitHub Desktop.
Doctrine2 QB workaround for indexBy
This file contains 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
// I want to modify the DQL include the 'index by' | |
// Reason: Often I find the indexBy function in the query builder frustrating | |
$qb = $qb->getQuery()->setDQL( | |
str_replace( | |
'WHERE', | |
'INDEX BY s.id WHERE', $qb->getDQL() | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment