protected function setListParentDataInMemory($relation, $key, $subContext, $context = null)
    {
        $memory = $this->getListMemory();

        $oldContext    = $memory->getContext();
        $oldSubContext = $memory->getSubContext();

        if (null !== $context) {
            $memory->setContext($context);
        }

        $memory->setSubContext($subContext);

        $memory->setListParent($relation, $key);

        if (null !== $context) {
            $memory->setContext($oldContext);
        }

        $memory->setSubContext($oldSubContext);
    }