/** * Filter the query by a related \gossi\trixionary\model\SkillPart object * * @param \gossi\trixionary\model\SkillPart|ObjectCollection $skillPart the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildSkillQuery The current query, for fluid interface */ public function filterByComposite($skillPart, $comparison = null) { if ($skillPart instanceof \gossi\trixionary\model\SkillPart) { return $this->addUsingAlias(SkillTableMap::COL_ID, $skillPart->getCompositeId(), $comparison); } elseif ($skillPart instanceof ObjectCollection) { return $this->useCompositeQuery()->filterByPrimaryKeys($skillPart->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByComposite() only accepts arguments of type \\gossi\\trixionary\\model\\SkillPart or Collection'); } }
/** * Exclude object from result * * @param ChildSkillPart $skillPart Object to remove from the list of results * * @return $this|ChildSkillPartQuery The current query, for fluid interface */ public function prune($skillPart = null) { if ($skillPart) { $this->addCond('pruneCond0', $this->getAliasedColName(SkillPartTableMap::COL_PART_ID), $skillPart->getPartId(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(SkillPartTableMap::COL_COMPOSITE_ID), $skillPart->getCompositeId(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; }
/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by find*() * and findPk*() calls. * * @param \gossi\trixionary\model\SkillPart $obj A \gossi\trixionary\model\SkillPart object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if (null === $key) { $key = serialize(array((string) $obj->getPartId(), (string) $obj->getCompositeId())); } // if key === null self::$instances[$key] = $obj; } }