Пример #1
0
 /**
  * Declares an association between this object and a ChildCompetition object.
  *
  * @param  ChildCompetition $v
  * @return $this|\iuf\junia\model\Startgroup The current object (for fluent API support)
  * @throws PropelException
  */
 public function setCompetition(ChildCompetition $v = null)
 {
     if ($v === null) {
         $this->setCompetitionId(NULL);
     } else {
         $this->setCompetitionId($v->getId());
     }
     $this->aCompetition = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildCompetition object, it will not be re-added.
     if ($v !== null) {
         $v->addStartgroup($this);
     }
     return $this;
 }
Пример #2
0
 /**
  * Filter the query by a related \iuf\junia\model\Competition object
  *
  * @param \iuf\junia\model\Competition|ObjectCollection $competition The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildStartgroupQuery The current query, for fluid interface
  */
 public function filterByCompetition($competition, $comparison = null)
 {
     if ($competition instanceof \iuf\junia\model\Competition) {
         return $this->addUsingAlias(StartgroupTableMap::COL_COMPETITION_ID, $competition->getId(), $comparison);
     } elseif ($competition instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(StartgroupTableMap::COL_COMPETITION_ID, $competition->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCompetition() only accepts arguments of type \\iuf\\junia\\model\\Competition or Collection');
     }
 }
Пример #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildCompetition $competition Object to remove from the list of results
  *
  * @return $this|ChildCompetitionQuery The current query, for fluid interface
  */
 public function prune($competition = null)
 {
     if ($competition) {
         $this->addUsingAlias(CompetitionTableMap::COL_ID, $competition->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }