コード例 #1
0
 /**
  * Exclude object from result
  *
  * @param     TipoSocio $tipoSocio Object to remove from the list of results
  *
  * @return    TipoSocioQuery The current query, for fluid interface
  */
 public function prune($tipoSocio = null)
 {
     if ($tipoSocio) {
         $this->addUsingAlias(TipoSocioPeer::ID, $tipoSocio->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #2
0
 /**
  * Filter the query by a related TipoSocio object
  *
  * @param     TipoSocio|PropelCollection $tipoSocio The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    SocioQuery The current query, for fluid interface
  */
 public function filterByTipoSocio($tipoSocio, $comparison = null)
 {
     if ($tipoSocio instanceof TipoSocio) {
         return $this->addUsingAlias(SocioPeer::TIPO_SOCIO_ID, $tipoSocio->getId(), $comparison);
     } elseif ($tipoSocio instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(SocioPeer::TIPO_SOCIO_ID, $tipoSocio->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByTipoSocio() only accepts arguments of type TipoSocio or PropelCollection');
     }
 }
コード例 #3
0
ファイル: BaseSocio.php プロジェクト: nico85/2012_pw2_tp2
 /**
  * Declares an association between this object and a TipoSocio object.
  *
  * @param      TipoSocio $v
  * @return     Socio The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setTipoSocio(TipoSocio $v = null)
 {
     if ($v === null) {
         $this->setTipoSocioId(3);
     } else {
         $this->setTipoSocioId($v->getId());
     }
     $this->aTipoSocio = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the TipoSocio object, it will not be re-added.
     if ($v !== null) {
         $v->addSocio($this);
     }
     return $this;
 }