Easiest is to not use Doctrine: you just want to retrieve an array from a database table; has nothing to do with entities, objects or whatever. Why got through the trouble of using an ORM if you don't use your data in an OOP way? Second easiest is to use a collection in another object with a OneToMany relation to this Domain-entity. Third would be to loop through this result in PHP (for instance in a getter) and make the array you want. That is probably even possible without explicitly coding the loop, as PHP has loads of array-functions.
On Sunday, 20 April 2014 00:34:03 UTC+2, Parsifal wrote: > > I have an entity with just one property. e.g. domain, I tried all 4 > built-in hydrators and also custom hydrator with fetchAll and result looks > like this: > > Array > ( > [0] => Array > ( > [domain] => > ) > > [1] => Array > ( > [domain] => > ) > > ) > Is it possible to hydrate it like: > > Array > ( > [0] => > [1] => > > ) > > The array key is not important, may be 0,1, or [domain] as > property name, I just need the values, not as a mutil-dimentional array > like the first above. Is it possible to hydrate the entities with doctrine > as I want above? > > > > -- 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.
