Esempio n. 1
0
 /**
  * Filter the query by a related \gossi\trixionary\model\Object object
  *
  * @param \gossi\trixionary\model\Object|ObjectCollection $object the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildSportQuery The current query, for fluid interface
  */
 public function filterByObject($object, $comparison = null)
 {
     if ($object instanceof \gossi\trixionary\model\Object) {
         return $this->addUsingAlias(SportTableMap::COL_ID, $object->getSportId(), $comparison);
     } elseif ($object instanceof ObjectCollection) {
         return $this->useObjectQuery()->filterByPrimaryKeys($object->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByObject() only accepts arguments of type \\gossi\\trixionary\\model\\Object or Collection');
     }
 }
Esempio n. 2
0
 /**
  * Internal mechanism to set the Sport id
  * 
  * @param Object $model
  * @param mixed $relatedId
  */
 protected function doSetSportId(Object $model, $relatedId)
 {
     if ($model->getSportId() !== $relatedId) {
         $model->setSportId($relatedId);
         return true;
     }
     return false;
 }