I created a complex native query which is populated with quite a few parameters.
When executed it didn't deliver the expected result.
To send the query to the database I use the following code:
$this->getEntityManager()
->getConnection()
->executeQuery($query, $parameter, $types)
->