Esempio n. 1
0
 /**
  * Filter the query by a related \gossi\trixionary\model\Object object
  *
  * @param \gossi\trixionary\model\Object|ObjectCollection $object 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 ChildSkillQuery The current query, for fluid interface
  */
 public function filterByObject($object, $comparison = null)
 {
     if ($object instanceof \gossi\trixionary\model\Object) {
         return $this->addUsingAlias(SkillTableMap::COL_OBJECT_ID, $object->getId(), $comparison);
     } elseif ($object instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(SkillTableMap::COL_OBJECT_ID, $object->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByObject() only accepts arguments of type \\gossi\\trixionary\\model\\Object or Collection');
     }
 }
Esempio n. 2
0
 /**
  * Exclude object from result
  *
  * @param   ChildObject $object Object to remove from the list of results
  *
  * @return $this|ChildObjectQuery The current query, for fluid interface
  */
 public function prune($object = null)
 {
     if ($object) {
         $this->addUsingAlias(ObjectTableMap::COL_ID, $object->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }