예제 #1
0
 /**
  * Filter the query by a related \App\Models\Period object
  *
  * @param \App\Models\Period|ObjectCollection $period 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 ChildApplicationQuery The current query, for fluid interface
  */
 public function filterByPeriod($period, $comparison = null)
 {
     if ($period instanceof \App\Models\Period) {
         return $this->addUsingAlias(ApplicationTableMap::COL_PERIOD_ID, $period->getId(), $comparison);
     } elseif ($period instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ApplicationTableMap::COL_PERIOD_ID, $period->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPeriod() only accepts arguments of type \\App\\Models\\Period or Collection');
     }
 }
예제 #2
0
 /**
  * Declares an association between this object and a ChildPeriod object.
  *
  * @param  ChildPeriod $v
  * @return $this|\App\Models\Application The current object (for fluent API support)
  * @throws PropelException
  */
 public function setPeriod(ChildPeriod $v = null)
 {
     if ($v === null) {
         $this->setPeriodId(NULL);
     } else {
         $this->setPeriodId($v->getId());
     }
     $this->aPeriod = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildPeriod object, it will not be re-added.
     if ($v !== null) {
         $v->addApplication($this);
     }
     return $this;
 }
예제 #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildPeriod $period Object to remove from the list of results
  *
  * @return $this|ChildPeriodQuery The current query, for fluid interface
  */
 public function prune($period = null)
 {
     if ($period) {
         $this->addUsingAlias(PeriodTableMap::COL_ID, $period->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }