public function setRelations($value)
    {
        if (is_array($value)) {
            $bag = new Bag();
            foreach ($value as $itemParameters) {
                $bag->add(new Relation($itemParameters));
            }
            $value = $bag;
        }
        return $this->setParameter('relations', $value);
    }