Example #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');
     }
 }
Example #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildGroup $group Object to remove from the list of results
  *
  * @return $this|ChildGroupQuery The current query, for fluid interface
  */
 public function prune($group = null)
 {
     if ($group) {
         $this->addUsingAlias(GroupTableMap::COL_ID, $group->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Example #3
0
 /**
  * Declares an association between this object and a ChildGroup object.
  *
  * @param  ChildGroup $v
  * @return $this|\gossi\trixionary\model\SkillGroup The current object (for fluent API support)
  * @throws PropelException
  */
 public function setGroup(ChildGroup $v = null)
 {
     // aggregate_column_relation behavior
     if (null !== $this->aGroup && $v !== $this->aGroup) {
         $this->oldGroupSkillCount = $this->aGroup;
     }
     if ($v === null) {
         $this->setGroupId(NULL);
     } else {
         $this->setGroupId($v->getId());
     }
     $this->aGroup = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildGroup object, it will not be re-added.
     if ($v !== null) {
         $v->addSkillGroup($this);
     }
     return $this;
 }