Пример #1
0
 /**
  * Declares an association between this object and a ChildCanon object.
  *
  * @param  ChildCanon $v
  * @return $this|\SpoilerWiki\Work The current object (for fluent API support)
  * @throws PropelException
  */
 public function setcanon(ChildCanon $v = null)
 {
     if ($v === null) {
         $this->setCanonId(NULL);
     } else {
         $this->setCanonId($v->getId());
     }
     $this->acanon = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildCanon object, it will not be re-added.
     if ($v !== null) {
         $v->addWork($this);
     }
     return $this;
 }
Пример #2
0
 /**
  * Filter the query by a related \SpoilerWiki\Canon object
  *
  * @param \SpoilerWiki\Canon|ObjectCollection $canon 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 ChildTopicQuery The current query, for fluid interface
  */
 public function filterBycanon($canon, $comparison = null)
 {
     if ($canon instanceof \SpoilerWiki\Canon) {
         return $this->addUsingAlias(TopicTableMap::COL_CANON_ID, $canon->getId(), $comparison);
     } elseif ($canon instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TopicTableMap::COL_CANON_ID, $canon->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBycanon() only accepts arguments of type \\SpoilerWiki\\Canon or Collection');
     }
 }
Пример #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildCanon $canon Object to remove from the list of results
  *
  * @return $this|ChildCanonQuery The current query, for fluid interface
  */
 public function prune($canon = null)
 {
     if ($canon) {
         $this->addUsingAlias(CanonTableMap::COL_ID, $canon->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }