public function save() { parent::save(); foreach ($this->tours as $tour) { $tour->setDbField('ParentId', $this->tour->Id); $tour->setId($this->tour->TextId . '.' . $tour->getNumber()); $tour->save(); } }
public function save() { parent::save(); foreach ($this->questions as $q) { $q->setFieldValue('ParentId', $this->tour->Id); $q->save(); } }