Le 02/07/2014 15:23, Nima Sadjadi a écrit :

Sorry i am confused. QueryBuilder generates DQL statement without actually querying db? Or it queries db?


The QueryBuilder only builds the Query object (it builds the DQL and sets a few other settings, like parameters). It does not execute the query. This needs to be done later. This is why code using the QueryBuilder generally ends with

return $queryBuilder->getQuery()->getResult()

getQuery() builds the query object, and then getResult() will execute the query.

--
Christophe | Stof

--
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to