Hint: toArray() is probably not what you’re looking for.
->toArray()
Most programmers would probably assume that calling toArray() on the collection would simply place all the objects into an array. While toArray() does do that, it also converts the objects themselves into associative arrays, which is likely not what you want.
->getData()
Not exactly the most intuitive name, getData() actually takes all the objects in the Doctrine Collection object and places them into an array – without altering the objects themselves.

getDate() was exactly what I was looking for, but it has really ambiguous name. Thanks for sharing!
thanks a lot!
that’s what i really looked for!:)