Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doctrine 2 - getSQL from $em->find()

Could someone tell me, how to take pure SQL from $em->find() method?

like image 482
Jazi Avatar asked Oct 07 '22 04:10

Jazi


1 Answers

Your question is unclear.

  • If you mean "is it possible to find objects with raw SQL", then check the Native SQL section in the Doctrine 2 documentation;
  • If you mean "is it possible to see the SQL generated by a Doctrine query", then configure a SQL logger, as outlined in this answer.
like image 141
BenMorel Avatar answered Oct 13 '22 10:10

BenMorel