Created
March 18, 2020 14:19
-
-
Save fchaussin/a901c1458d5a3d8b539a2f604a8bfc33 to your computer and use it in GitHub Desktop.
Display SQL debug for TYPO3 Extbase query builder
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
$query = $this->createQuery(); | |
$query->equals('mm.uid_foreign', $uid); | |
$return = $query->count(); | |
$queryParser = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::class); | |
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL()); | |
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getParameters()); | |
return $return; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment