Example #1
0
 /**
  * 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 ChildReferenceQuery The current query, for fluid interface
  */
 public function filterByVideo($video, $comparison = null)
 {
     if ($video instanceof \gossi\trixionary\model\Video) {
         return $this->addUsingAlias(ReferenceTableMap::COL_ID, $video->getReferenceId(), $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');
     }
 }
Example #2
0
 /**
  * Internal mechanism to set the Reference id
  * 
  * @param Video $model
  * @param mixed $relatedId
  */
 protected function doSetReferenceId(Video $model, $relatedId)
 {
     if ($model->getReferenceId() !== $relatedId) {
         $model->setReferenceId($relatedId);
         return true;
     }
     return false;
 }