Пример #1
0
 /**
  * Filter the query by a related \Verse object
  *
  * @param \Verse|ObjectCollection $verse 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 ChildPassageQuery The current query, for fluid interface
  */
 public function filterByVerse($verse, $comparison = null)
 {
     if ($verse instanceof \Verse) {
         return $this->addUsingAlias(PassageTableMap::COL_VERSE_ID, $verse->getId(), $comparison);
     } elseif ($verse instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PassageTableMap::COL_VERSE_ID, $verse->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByVerse() only accepts arguments of type \\Verse or Collection');
     }
 }
Пример #2
0
 /**
  * Declares an association between this object and a ChildVerse object.
  *
  * @param  ChildVerse $v
  * @return $this|\Passage The current object (for fluent API support)
  * @throws PropelException
  */
 public function setVerse(ChildVerse $v = null)
 {
     if ($v === null) {
         $this->setVerseId(NULL);
     } else {
         $this->setVerseId($v->getId());
     }
     $this->aVerse = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildVerse object, it will not be re-added.
     if ($v !== null) {
         $v->addPassage($this);
     }
     return $this;
 }
Пример #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildVerse $verse Object to remove from the list of results
  *
  * @return $this|ChildVerseQuery The current query, for fluid interface
  */
 public function prune($verse = null)
 {
     if ($verse) {
         $this->addUsingAlias(VerseTableMap::COL_ID, $verse->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }