/** * Filter the query by a related \gossi\trixionary\model\Video object * * @param \gossi\trixionary\model\Video|ObjectCollection $video the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildSkillQuery The current query, for fluid interface */ public function filterByVideo($video, $comparison = null) { if ($video instanceof \gossi\trixionary\model\Video) { return $this->addUsingAlias(SkillTableMap::COL_ID, $video->getSkillId(), $comparison); } elseif ($video instanceof ObjectCollection) { return $this->useVideoQuery()->filterByPrimaryKeys($video->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByVideo() only accepts arguments of type \\gossi\\trixionary\\model\\Video or Collection'); } }
/** * Internal mechanism to set the Skill id * * @param Video $model * @param mixed $relatedId */ protected function doSetSkillId(Video $model, $relatedId) { if ($model->getSkillId() !== $relatedId) { $model->setSkillId($relatedId); return true; } return false; }