/** * Declares an association between this object and a CategorieMatiere object. * * @param CategorieMatiere $v * @return Matiere The current object (for fluent API support) * @throws PropelException */ public function setCategorieMatiere(CategorieMatiere $v = null) { if ($v === null) { $this->setCategorieId(1); } else { $this->setCategorieId($v->getId()); } $this->aCategorieMatiere = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the CategorieMatiere object, it will not be re-added. if ($v !== null) { $v->addMatiere($this); } return $this; }
/** * Filter the query by a related CategorieMatiere object * * @param CategorieMatiere|PropelCollection $categorieMatiere The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MatiereQuery The current query, for fluid interface */ public function filterByCategorieMatiere($categorieMatiere, $comparison = null) { if ($categorieMatiere instanceof CategorieMatiere) { return $this ->addUsingAlias(MatierePeer::CATEGORIE_ID, $categorieMatiere->getId(), $comparison); } elseif ($categorieMatiere instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this ->addUsingAlias(MatierePeer::CATEGORIE_ID, $categorieMatiere->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByCategorieMatiere() only accepts arguments of type CategorieMatiere or PropelCollection'); } }
/** * Exclude object from result * * @param CategorieMatiere $categorieMatiere Object to remove from the list of results * * @return CategorieMatiereQuery The current query, for fluid interface */ public function prune($categorieMatiere = null) { if ($categorieMatiere) { $this->addUsingAlias(CategorieMatierePeer::ID, $categorieMatiere->getId(), Criteria::NOT_EQUAL); } return $this; }