Skip to content
Advertisement

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.

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement