Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » take a request on each element of an Parent.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 750 Views
  • derpixler
    Avatar
    Community Member
    4 Posts

    take a request on each element of an Parent. Link to this post

    hey guys

    will take a request on each element of an Parent.
    I think so:
    $doSet = DataObject::get( "CategoryHolder","`ParentID` = '".$this->ID."'");

    and i get this array,

    DataObjectSet Object
    (
    .....[items:protected] => Array
    ..........(
    ...............[0] => CategoryHolder Object
    ................(
    ...................[record:protected] => Array
    ....................(
    .........................[ID] => 17
    .........................[ClassName] => CategoryHolder

    but how i can get the children of CategoryHolder with the ID 17.

    I think so:
    $doSet = DataObject::get( "CategoryHolder","`ParentID` = '".$this->ID."'");
    $doSet = DataObject::get( "CategoryHolder","`ParentID` = '".$doSet->ID."'");

    but the $doSet->ID is empty.

    750 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.