Esempio n. 1
0
 /**
  * Filter the query by a related \gossi\trixionary\model\Group object
  *
  * @param \gossi\trixionary\model\Group|ObjectCollection $group 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 ChildSkillGroupQuery The current query, for fluid interface
  */
 public function filterByGroup($group, $comparison = null)
 {
     if ($group instanceof \gossi\trixionary\model\Group) {
         return $this->addUsingAlias(SkillGroupTableMap::COL_GROUP_ID, $group->getId(), $comparison);
     } elseif ($group instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(SkillGroupTableMap::COL_GROUP_ID, $group->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByGroup() only accepts arguments of type \\gossi\\trixionary\\model\\Group or Collection');
     }
 }