Exemplo n.º 1
0
 /**
  * Exclude object from result
  *
  * @param     Socio $socio Object to remove from the list of results
  *
  * @return    SocioQuery The current query, for fluid interface
  */
 public function prune($socio = null)
 {
     if ($socio) {
         $this->addUsingAlias(SocioPeer::ID, $socio->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Filter the query by a related Socio object
  *
  * @param     Socio|PropelCollection $socio The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    AlquilerQuery The current query, for fluid interface
  */
 public function filterBySocio($socio, $comparison = null)
 {
     if ($socio instanceof Socio) {
         return $this->addUsingAlias(AlquilerPeer::SOCIO_ID, $socio->getId(), $comparison);
     } elseif ($socio instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(AlquilerPeer::SOCIO_ID, $socio->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBySocio() only accepts arguments of type Socio or PropelCollection');
     }
 }
Exemplo n.º 3
0
 /**
  * Declares an association between this object and a Socio object.
  *
  * @param      Socio $v
  * @return     Comentario The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setSocio(Socio $v = null)
 {
     if ($v === null) {
         $this->setSocioId(NULL);
     } else {
         $this->setSocioId($v->getId());
     }
     $this->aSocio = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Socio object, it will not be re-added.
     if ($v !== null) {
         $v->addComentario($this);
     }
     return $this;
 }