Answers for "odoctrine querybuilder print sql"

PHP
0

odoctrine querybuilder print sql

$qb = $entityManager->createQueryBuilder();

$query = $qb->select('assoc1.thing as thing1, assoc2.thing as thing2')
    ->from(assoc1::class, 'assoc1')
    ->innerJoin(assoc2::class, 'assoc2', 'with', 'assoc1.someId = assoc2.someId')
    ->getQuery();

$sql = $query->getSQL();

var_dump($sql);
Posted by: Guest on August-26-2021

Browse Popular Code Answers by Language