Top "Dql" questions

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

Doctrine 2 DQL CASE WHEN in Count

I have this Query in native MySQL Code SELECT * FROM `turn` LEFT JOIN ( poi ) ON ( turn.id = poi.turn_id ) …

mysql symfony doctrine-orm dql
pass array of conditions to doctrine expr()->orx() method

I need to construct DQL with a QueryBuilder like this [QUERY]... AND WHERE e.type = x OR e.type = Y …

php oop doctrine-orm doctrine dql
Symfony 2 Doctrine COUNT

I have in my table "Artiste" one column "valideAdmin" who takes value 1 or 0. I try to make a simple count …

php symfony doctrine dql
Deleting record in many-to-many table

I'm following the security chapter of the Symfony 2 book. There's is an example with a table USERS and GROUPS. There …

doctrine symfony many-to-many dql
Select count() in Doctrine DQL with left join manyToMany unidirectional relation where user does NOT have relation specific group

Situaction: I am trying to select count() in DQL for users NOT in specific group. Standard ManyToMany unidirectional relation between …

sql symfony doctrine-orm fosuserbundle dql
Doctrine 2 - How to use discriminator column in where clause

I was used discriminator column in where clause like this: //f = root entity $qb = $this->createQueryBuilder('f'); $qb->…

php doctrine-orm dql discriminator
Doctrine: Multiple (whereIn OR whereIn) query?

I'm having trouble crafting a fairly simple query with Doctrine... I have two arrays ($countries, $cities) and I need to …

symfony1 doctrine where-clause dql
Doctrine2 Multiple Join works with createQuery but not with queryBuilder

If I'm using querying without queryBuilder with this dql $query = $this->_em ->createQuery("SELECT p, g, c …

php symfony doctrine-orm dql
CASTING attributes for Ordering on a Doctrine2 DQL Query

I am trying to get Doctrine2 Entities, ordered by their ID which apparently is a String even though it contains …

casting doctrine-orm type-conversion dql
Doctrine 2 DQL - Select rows where a many-to-many field is empty?

I have two classes in this example - DeliveryMethod and Country. They have a many-to-many relationship with each other. What …

php doctrine dql