I have a Doctrine Query object returned by a service. Then I need to add some "wheres, order by and Limit" parts. Is posible convert a QUery Object to QueryBuilder Object? How I do it?
You cannot convert a query object to a query builder. Once you have a query object, you can use:
$query->getDQL();
to retrieve the DQL for that query object, and once you manipulated it (it's a string, so it is up to you)
$query->setDQL($modifiedDql);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With