Doctrine toarray does not convert relations.
Posted
by terrani
on Stack Overflow
See other posts from Stack Overflow
or by terrani
Published on 2010-03-25T01:43:56Z
Indexed on
2010/03/25
1:53 UTC
Read the original article
Hit count: 481
Hi,
so..I followed doctrine documnetation to get started. Here is the documentation http://www.doctrine-project.org/documentation/manual/1_2/en/working-with-models#dealing-with-relations:retrieving-related-records
My code is
$User = Doctrine_Core::getTable("User")->find(1);
when I access relations by $User->Phonenumbers, it works. When I convert User object to array by using toArray() method, it does not convert relations to array. It simply display $User data.
Am i missing something?
© Stack Overflow or respective owner