Doctrine - how to get the SQL INSERT query, in the postSave() event?

后端 未结 5 932
一向
一向 2021-02-09 05:57

I would like to get the exact SQL INSERT query that Doctrine generates when an object\'s save() method is called.

Preferably, I would like to get it in the postSave() ev

5条回答
  •  无人共我
    2021-02-09 06:16

    You can convert you DQL query to SQL by this function: http://tokarchuk.ru/2010/12/dql-query-to-raw-sql/

提交回复
热议问题