Project

General

Profile

Bug #65527

Updated by Markus Klein almost 9 years ago

I've got the following data-structure 

 one Supercart -1:n-> got many carts -1:n-> got many Items 

 Now I want to use JSONVIEW to render each Object and all it's subobjects. 

 If the parent contains    only one child you can render the child. 

 Once you've got multiple children the routine breaks and you cannot access it's subobjects. 

 here is my JSONVIEWCONFIGURATION: 
 <pre> 
 

 $JsonViewConfiguration = [ 
             'applicationUser2Supercart' => [ 
                 '_descend' => [ 
                     'supercart' => [ 
                         '_exposeObjectIdentifier' => TRUE, 
                         '_descend' => [ 
                             'dateAdd' => [], 
                             'carts' => [ 
                                 '_exposeObjectIdentifier' => TRUE, 
                                 '_descend' => [ 
                                     'cartitems' => [ 
                                         '_descend'    => [ 
                                             'item'    => [], 
                                         ], 
                                     ], 
                                     'dateAdd' => [ 
                                         '_only' => ['date'], 
                                     ], 
                                 ], 
                             ], 
                         ], 
                     ], 
                 ], 
                 '_exposeObjectIdentifier' => TRUE, 
             ], 
         ]; 
 </pre> 

 It should be possible to access all children and their children and all of their properties.

Back