Esempio n. 1
0
 /**
  * Declares an association between this object and a ChildReference object.
  *
  * @param  ChildReference $v
  * @return $this|\gossi\trixionary\model\SkillReference The current object (for fluent API support)
  * @throws PropelException
  */
 public function setReference(ChildReference $v = null)
 {
     if ($v === null) {
         $this->setReferenceId(NULL);
     } else {
         $this->setReferenceId($v->getId());
     }
     $this->aReference = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildReference object, it will not be re-added.
     if ($v !== null) {
         $v->addSkillReference($this);
     }
     return $this;
 }
Esempio n. 2
0
 /**
  * Filter the query by a related \gossi\trixionary\model\Reference object
  *
  * @param \gossi\trixionary\model\Reference|ObjectCollection $reference 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 ChildVideoQuery The current query, for fluid interface
  */
 public function filterByReference($reference, $comparison = null)
 {
     if ($reference instanceof \gossi\trixionary\model\Reference) {
         return $this->addUsingAlias(VideoTableMap::COL_REFERENCE_ID, $reference->getId(), $comparison);
     } elseif ($reference instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(VideoTableMap::COL_REFERENCE_ID, $reference->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByReference() only accepts arguments of type \\gossi\\trixionary\\model\\Reference or Collection');
     }
 }
Esempio n. 3
0
 /**
  * Exclude object from result
  *
  * @param   ChildReference $reference Object to remove from the list of results
  *
  * @return $this|ChildReferenceQuery The current query, for fluid interface
  */
 public function prune($reference = null)
 {
     if ($reference) {
         $this->addUsingAlias(ReferenceTableMap::COL_ID, $reference->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }