Пример #1
0
 /**
  * Internal mechanism to set the Skill id
  * 
  * @param Picture $model
  * @param mixed $relatedId
  */
 protected function doSetSkillId(Picture $model, $relatedId)
 {
     if ($model->getSkillId() !== $relatedId) {
         $model->setSkillId($relatedId);
         return true;
     }
     return false;
 }
Пример #2
0
 /**
  * Filter the query by a related \gossi\trixionary\model\Picture object
  *
  * @param \gossi\trixionary\model\Picture|ObjectCollection $picture 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 filterByPicture($picture, $comparison = null)
 {
     if ($picture instanceof \gossi\trixionary\model\Picture) {
         return $this->addUsingAlias(SkillTableMap::COL_ID, $picture->getSkillId(), $comparison);
     } elseif ($picture instanceof ObjectCollection) {
         return $this->usePictureQuery()->filterByPrimaryKeys($picture->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByPicture() only accepts arguments of type \\gossi\\trixionary\\model\\Picture or Collection');
     }
 }