↧
Answer by Matt Janssen for Select One column Doctrine DQL
As of Doctrine 2.10, you can use Scalar Column Hydration:$query = $em->createQuery('SELECT a.id FROM CmsUser u');$ids = $query->getResult(Query::HYDRATE_SCALAR_COLUMN);or$ids =...
View ArticleAnswer by Julien Lamarche for Select One column Doctrine DQL
I'm not sure what version of Doctrine j0k was using. It provided some answers, but I did have trouble finding Doctrine_Query and Doctrine_Core classes. I am using Doctrine 2.3.4. The following worked...
View ArticleAnswer by j0k for Select One column Doctrine DQL
This is because Doctrine hydrate the response with all the object information, so all columns.You need to use a different hydration method, there are many one, but let's focus on 5 of...
View ArticleSelect One column Doctrine DQL
I need a simple column for a table.By example a table "project", with column id, name and year.If I do:$q = Doctrine_Query::create() ->select('a.pro_id') ->from('fndr_proyecto a')...
View Article