phpsqldoctrine

Execute raw SQL using Doctrine 2


I want to execute raw SQL using Doctrine 2

I need to truncate the database tables and initialize tables with default test data.


Solution

  • I found out the answer is probably:

    A NativeQuery lets you execute native SQL, mapping the results according to your specifications. Such a specification that describes how an SQL result set is mapped to a Doctrine result is represented by a ResultSetMapping.

    Source: Native SQL.