To answer the original question of is it possible, yes. It's actually quite 
easy, you can use a Custom Hydrator, and the code you need for it is 
already out there. This one does use the ID as the key but you could omit 
that part.
https://www.techpunch.co.uk/development/create-custom-doctrine2-hydrator-symfony2

If you're using Symfony 2, that shows you how to configure it. If not, I 
guess research it then come back and ask for help with that part :)

On Saturday, April 19, 2014 5:34:03 PM UTC-5, 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.

Reply via email to