Last active
December 22, 2022 14:33
-
-
Save Scarbous/67f53915d42bd281f4d93f74b44e2f9b to your computer and use it in GitHub Desktop.
TYPO3 extbase get SQL statement from query
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
<?php | |
class MyRepository extends Repository | |
{ | |
function findSome() { | |
$query = $this->createQuery(); | |
$query->matching( | |
// ... | |
); | |
$queryParser = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::class); | |
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment