Top "Doctrine-orm" questions

Doctrine ORM is a PHP ORM.

doctrine: QueryBuilder vs createQuery?

In Doctrine you can create DQL in 2 ways: EntityManager::createQuery: $query = $em->createQuery('SELECT u FROM MyProject\Model\User …

doctrine-orm
request with multiple id Symfony2 Doctrine

I've got an array of IDs and I'd like to get an entity array from my IDs array. I can't …

symfony doctrine-orm
How to select randomly with doctrine

Here is how I query my database for some words $query = $qb->select('w') ->from('DbEntities\Entity\…

php doctrine-orm dql
Automatic values for updated_at, created_at in Doctrine

I want to make fields updated_at and created_at in my Doctrine entities to update automatically. In Ruby on …

php doctrine-orm
Left join ON condition AND other condition syntax in Doctrine

I'm using Doctrine's querybuilder in Symfony2 to create a query to fetch entities. My current code looks like this: $repository = $…

php mysql sql symfony doctrine-orm
Symfony2-Doctrine: ManyToMany relation is not saved to database

I have two PHP model classes named Category and Item. A Category may have many Items and an Item may …

many-to-many doctrine-orm symfony
How to get entity manager for Doctrine entity with Symfony 2.1 from inside controller

How can I get an entity manager from inside a controller with latest Symfony and Doctrine? The way described in "…

symfony controller doctrine-orm
The differences between GeneratedValue strategies

In the Doctrine docs they mention that there exists a few different strategies for the @GeneratedValue annotation: AUTO SEQUENCE TABLE …

doctrine-orm
Doctrine 2 and Many-to-many link table with an extra field

(Sorry for my incoherent question: I tried to answer some questions as I was writing this post, but here it …

php mysql doctrine-orm
'where not in' query with doctrine query builder

Im trying to reproduce this query: SELECT * FROM `request_lines` where request_id not in( select requestLine_id from `asset_…

symfony doctrine doctrine-orm doctrine-query