private function hydrateItems(
        $daddyName,
        array $items,
        MetadataDataObjectJson $metadata,
        MetaDataCollection $mainCollection
    ) {
        $mergeArray = true;

        if ($mergeArray === true && $this->itemsAreAllOfType($items, array('object')) === true) {
            $metadata->appendRelation(
                $this->hydrateMetaDataRelationColumn(
                    $daddyName,
                    $this->mergeItems($items),
                    $metadata,
                    $mainCollection
                )
            );
        } else {
            $specialProperties = array();

            foreach ($items as $propName => $item) {
                // Relation of relation
                if (in_array($item->getType(), array('object', 'array')) === false) {
                    $specialProperties[$propName] = $item;
                    continue;
                }

                $metadata->appendRelation(
                    $this->hydrateMetaDataRelationColumn($daddyName, $item->getProperties(), $metadata, $mainCollection)
                );
            }
        }

        return $metadata;
    }
private function hydrateItems(
        $daddyName,
        array $items,
        MetadataDataObjectJson $metadata,
        MetaDataCollection $mainCollection
    ) {
        $mergeArray = true;

        if ($mergeArray === true && $this->itemsAreAllOfType($items, array('object')) === true) {
            $metadata->appendRelation(
                $this->hydrateMetaDataRelationColumn(
                    $daddyName,
                    $this->mergeItems($items),
                    $metadata,
                    $mainCollection
                )
            );
        } else {
            $specialProperties = array();

            foreach ($items as $propName => $item) {
                // Relation of relation
                if (in_array($item->getType(), array('object', 'array')) === false) {
                    $specialProperties[$propName] = $item;
                    continue;
                }

                $metadata->appendRelation(
                    $this->hydrateMetaDataRelationColumn($daddyName, $item->getProperties(), $metadata, $mainCollection)
                );
            }
        }

        return $metadata;
    }
private function hydrateItems ( $ daddyName , array $ items , MetadataDataObjectJson $ metadata , MetaDataCollection $ mainCollection ) { $ mergeArray = true ; if ( $ mergeArray === true && $ this -> itemsAreAllOfType ( $ items , array ( 'object' ) ) === true ) { $ metadata -> appendRelation ( $ this -> hydrateMetaDataRelationColumn ( $ daddyName , $ this -> mergeItems ( $ items ) , $ metadata , $ mainCollection ) ) ; } else { $ specialProperties = array ( ) ; foreach ( $ items as $ propName => $ item ) { // Relation of relation if ( in_array ( $ item -> getType ( ) , array ( 'object' , 'array' ) ) === false ) { $ specialProperties [ $ propName ] = $ item ; continue ; } $ metadata -> appendRelation ( $ this -> hydrateMetaDataRelationColumn ( $ daddyName , $ item -> getProperties ( ) , $ metadata , $ mainCollection ) ) ; } } return $ metadata ; }
Items is considered as relation

@param  string                 $daddyName
@param  array                  $items
@param  MetadataDataObjectJson $metadata
@return MetadataDataObjectJson
Items is considered as relation