private function parentsOf($model, &$parents)
    {
        $environment    = $this->getEnvironment();
        $dataDefinition = $environment->getDataDefinition();
        $collector      = new ModelCollector($this->getEnvironment());
        $relationships  = new RelationshipManager(
            $dataDefinition->getModelRelationshipDefinition(),
            $dataDefinition->getBasicDefinition()->getMode()
        );

        if (!$relationships->isRoot($model)) {
            $parent = $collector->searchParentOf($model);
            if (!isset($parents[$model->getProviderName()][$parent->getId()])) {
                $this->parentsOf($parent, $parents);
            }
        }

        $parents[$model->getProviderName()][$model->getId()] = 1;
    }