Пример #1
0
 /**
  * Filter the query by a related \iuf\junia\model\Event object
  *
  * @param \iuf\junia\model\Event|ObjectCollection $event 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 filterByEvent($event, $comparison = null)
 {
     if ($event instanceof \iuf\junia\model\Event) {
         return $this->addUsingAlias(StartgroupTableMap::COL_EVENT_ID, $event->getId(), $comparison);
     } elseif ($event instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(StartgroupTableMap::COL_EVENT_ID, $event->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByEvent() only accepts arguments of type \\iuf\\junia\\model\\Event or Collection');
     }
 }
Пример #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildEvent $event Object to remove from the list of results
  *
  * @return $this|ChildEventQuery The current query, for fluid interface
  */
 public function prune($event = null)
 {
     if ($event) {
         $this->addUsingAlias(EventTableMap::COL_ID, $event->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Пример #3
0
 /**
  * Declares an association between this object and a ChildEvent object.
  *
  * @param  ChildEvent $v
  * @return $this|\iuf\junia\model\Startgroup The current object (for fluent API support)
  * @throws PropelException
  */
 public function setEvent(ChildEvent $v = null)
 {
     if ($v === null) {
         $this->setEventId(NULL);
     } else {
         $this->setEventId($v->getId());
     }
     $this->aEvent = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildEvent object, it will not be re-added.
     if ($v !== null) {
         $v->addStartgroup($this);
     }
     return $this;
 }