public function remove(Groupe $groupe)
 {
     // Supprime le mail
     $this->db->Sql("DELETE FROM groupe WHERE id_groupe =:id", array('id' => $groupe->getId()));
 }
	/**
	 * Filter the query by a related Groupe object
	 *
	 * @param     Groupe|PropelCollection $groupe The related object(s) to use as filter
	 * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
	 *
	 * @return    CahierTexteCompteRenduQuery The current query, for fluid interface
	 */
	public function filterByGroupe($groupe, $comparison = null)
	{
		if ($groupe instanceof Groupe) {
			return $this
				->addUsingAlias(CahierTexteCompteRenduPeer::ID_GROUPE, $groupe->getId(), $comparison);
		} elseif ($groupe instanceof PropelCollection) {
			if (null === $comparison) {
				$comparison = Criteria::IN;
			}
			return $this
				->addUsingAlias(CahierTexteCompteRenduPeer::ID_GROUPE, $groupe->toKeyValue('PrimaryKey', 'Id'), $comparison);
		} else {
			throw new PropelException('filterByGroupe() only accepts arguments of type Groupe or PropelCollection');
		}
	}
Example #3
0
	/**
	 * Declares an association between this object and a Groupe object.
	 *
	 * @param      Groupe $v
	 * @return     JGroupesMatieres The current object (for fluent API support)
	 * @throws     PropelException
	 */
	public function setGroupe(Groupe $v = null)
	{
		if ($v === null) {
			$this->setIdGroupe(NULL);
		} else {
			$this->setIdGroupe($v->getId());
		}

		$this->aGroupe = $v;

		// Add binding for other direction of this n:n relationship.
		// If this object has already been added to the Groupe object, it will not be re-added.
		if ($v !== null) {
			$v->addJGroupesMatieres($this);
		}

		return $this;
	}
Example #4
0
	/**
	 * Exclude object from result
	 *
	 * @param     Groupe $groupe Object to remove from the list of results
	 *
	 * @return    GroupeQuery The current query, for fluid interface
	 */
	public function prune($groupe = null)
	{
		if ($groupe) {
			$this->addUsingAlias(GroupePeer::ID, $groupe->getId(), Criteria::NOT_EQUAL);
		}

		return $this;
	}