/**
  * Declares an association between this object and a ChildFormats object.
  *
  * @param  ChildFormats $v
  * @return $this|\RTemplatenamesInchapter The current object (for fluent API support)
  * @throws PropelException
  */
 public function setFormats(ChildFormats $v = null)
 {
     if ($v === null) {
         $this->setChapterid(NULL);
     } else {
         $this->setChapterid($v->getId());
     }
     $this->aFormats = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildFormats object, it will not be re-added.
     if ($v !== null) {
         $v->addRTemplatenamesInchapter($this);
     }
     return $this;
 }
Пример #2
0
 /**
  * Filter the query by a related \Formats object
  *
  * @param \Formats|ObjectCollection $formats 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 ChildContributionsQuery The current query, for fluid interface
  */
 public function filterByFormats($formats, $comparison = null)
 {
     if ($formats instanceof \Formats) {
         return $this->addUsingAlias(ContributionsTableMap::COL__FORCHAPTER, $formats->getId(), $comparison);
     } elseif ($formats instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ContributionsTableMap::COL__FORCHAPTER, $formats->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByFormats() only accepts arguments of type \\Formats or Collection');
     }
 }
Пример #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildFormats $formats Object to remove from the list of results
  *
  * @return $this|ChildFormatsQuery The current query, for fluid interface
  */
 public function prune($formats = null)
 {
     if ($formats) {
         $this->addUsingAlias(FormatsTableMap::COL_ID, $formats->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }