Ejemplo n.º 1
0
 /**
  * Filter the query by a related \SpoilerWiki\AssignedRole object
  *
  * @param \SpoilerWiki\AssignedRole|ObjectCollection $assignedRole the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildRoleQuery The current query, for fluid interface
  */
 public function filterByAssignedRole($assignedRole, $comparison = null)
 {
     if ($assignedRole instanceof \SpoilerWiki\AssignedRole) {
         return $this->addUsingAlias(RoleTableMap::COL_ID, $assignedRole->getUserId(), $comparison);
     } elseif ($assignedRole instanceof ObjectCollection) {
         return $this->useAssignedRoleQuery()->filterByPrimaryKeys($assignedRole->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByAssignedRole() only accepts arguments of type \\SpoilerWiki\\AssignedRole or Collection');
     }
 }