/**
  * Filter the query by a related Genero object
  *
  * @param     Genero|PropelCollection $genero The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    Usuario_interesesQuery The current query, for fluid interface
  */
 public function filterByGenero($genero, $comparison = null)
 {
     if ($genero instanceof Genero) {
         return $this->addUsingAlias(Usuario_interesesPeer::ID_GENERO, $genero->getId(), $comparison);
     } elseif ($genero instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(Usuario_interesesPeer::ID_GENERO, $genero->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByGenero() only accepts arguments of type Genero or PropelCollection');
     }
 }
Ejemplo n.º 2
0
 /**
  * Declares an association between this object and a Genero object.
  *
  * @param      Genero $v
  * @return     Lista The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setGenero(Genero $v = null)
 {
     if ($v === null) {
         $this->setId_genero(NULL);
     } else {
         $this->setId_genero($v->getId());
     }
     $this->aGenero = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Genero object, it will not be re-added.
     if ($v !== null) {
         $v->addLista($this);
     }
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * Exclude object from result
  *
  * @param     Genero $genero Object to remove from the list of results
  *
  * @return    GeneroQuery The current query, for fluid interface
  */
 public function prune($genero = null)
 {
     if ($genero) {
         $this->addUsingAlias(GeneroPeer::ID, $genero->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }