/**
  * Filter the query by a related \App\Propel\PeriodicPlan object
  *
  * @param \App\Propel\PeriodicPlan|ObjectCollection $periodicPlan 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 ChildPeriodicPlanExceptionQuery The current query, for fluid interface
  */
 public function filterByPeriodicPlan($periodicPlan, $comparison = null)
 {
     if ($periodicPlan instanceof \App\Propel\PeriodicPlan) {
         return $this->addUsingAlias(PeriodicPlanExceptionTableMap::COL_PERIODIC_PLAN_ID, $periodicPlan->getPeriodicPlanId(), $comparison);
     } elseif ($periodicPlan instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PeriodicPlanExceptionTableMap::COL_PERIODIC_PLAN_ID, $periodicPlan->toKeyValue('PrimaryKey', 'PeriodicPlanId'), $comparison);
     } else {
         throw new PropelException('filterByPeriodicPlan() only accepts arguments of type \\App\\Propel\\PeriodicPlan or Collection');
     }
 }
Пример #2
0
 /**
  * Declares an association between this object and a ChildPeriodicPlan object.
  *
  * @param  ChildPeriodicPlan $v
  * @return $this|\App\Propel\UserPeriodicPlan The current object (for fluent API support)
  * @throws PropelException
  */
 public function setPeriodicPlan(ChildPeriodicPlan $v = null)
 {
     if ($v === null) {
         $this->setPeriodicPlanId(NULL);
     } else {
         $this->setPeriodicPlanId($v->getPeriodicPlanId());
     }
     $this->aPeriodicPlan = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildPeriodicPlan object, it will not be re-added.
     if ($v !== null) {
         $v->addUserPeriodicPlan($this);
     }
     return $this;
 }
Пример #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildPeriodicPlan $periodicPlan Object to remove from the list of results
  *
  * @return $this|ChildPeriodicPlanQuery The current query, for fluid interface
  */
 public function prune($periodicPlan = null)
 {
     if ($periodicPlan) {
         $this->addUsingAlias(PeriodicPlanTableMap::COL_PERIODIC_PLAN_ID, $periodicPlan->getPeriodicPlanId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }