Thanks a lot Christophe, Is there any advantage and/or performance increase using QueryBuilder instead of using dql directly? or this is just for developer convenience?
On Wed, Jul 2, 2014 at 6:11 PM, Christophe COEVOET <[email protected]> wrote: > 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. > -- 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.
