Top "Dql" questions

Doctrine Query Language (DQL) is an Object Query Language created for helping users in complex object retrieval.

Doctrine query distinct related entity

I'm probably overlooking something very simple and just been staring at it too much, but I can't get this DQL …

php doctrine-orm dql
Use a DATE() function in a WHERE clause with DQL

I get a strange error when I execute this DQL query: SELECT u FROM User u LEFT JOIN u.schedule …

doctrine doctrine-orm dql
Get random records with Doctrine

I wonder how to get a random number of Members from a Group, but I do not know what is …

php random doctrine-orm dql
Better to use DQL for getting Column Count or Get Collection Then Count?

I am quite sure that DQL will be the way to go, but I am wondering if Doctrine, i am …

doctrine doctrine-orm dql
How to make an insert query in DQL

I'm working with symfony and I would like to know how I can do a simple insert using the doctrine:…

insert dql doctrine-1.2
Doctrine 2.1 DQL - Many-to-many query multiple values - Item in multiple categories?

This may seem like a rudimentary request, but I can't seem to get it to work, so I'm either missing …

sql doctrine many-to-many dql
Doctrine 2 in Symfony 2 - Filtering a QueryBuilder by an association

I have my two classes User and Role, and I need to make a QueryBuilder which returns a query for …

php symfony doctrine-orm dql query-builder
How to order by a computed value in DQL

I'm trying to order the results of my query by whether or not they match my original entity on a …

doctrine-orm dql
How to find by referenced document in Doctrine ODM with MongoDB?

I have one document in my "params" collection like this: { "_id": ObjectId("4d124cef3ffcf6f410000037"), "code": "color", "productTypes": [ { "$ref": "…

mongodb doctrine dql
Symfony and Doctrine DQL query builder: how to use multiple setParameters inside if condition checks?

Using Symfony and Doctrine with the DQL query builder, I need to optionally add some WHERE conditions with parameters, with …

php symfony doctrine-orm doctrine dql