symfony - Convert Doctrine 2 result object (entity) to array? -


i know possible specify want array type instead of object type when run query doctrine. however, happen working code can't edit returns me result query object , want able convert array somehow. seems in older version doctrine used have toarray() can used.

is there similar can use?

no, doctrine 2 uses data mapper pattern , doesn't make assumptions php class. if class doesn't provide toarray() method explicitly, you'd need create array manually object's getter methods.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -