/** * Filter the query by a related \CyberdenBundle\Model\Administrator object * * @param \CyberdenBundle\Model\Administrator|ObjectCollection $administrator The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildSessionQuery The current query, for fluid interface */ public function filterByAdministrator($administrator, $comparison = null) { if ($administrator instanceof \CyberdenBundle\Model\Administrator) { return $this->addUsingAlias(SessionTableMap::COL_ADMINISTRATOR_ID, $administrator->getId(), $comparison); } elseif ($administrator instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(SessionTableMap::COL_ADMINISTRATOR_ID, $administrator->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByAdministrator() only accepts arguments of type \\CyberdenBundle\\Model\\Administrator or Collection'); } }
/** * Exclude object from result * * @param ChildAdministrator $administrator Object to remove from the list of results * * @return $this|ChildAdministratorQuery The current query, for fluid interface */ public function prune($administrator = null) { if ($administrator) { $this->addUsingAlias(AdministratorTableMap::COL_ID, $administrator->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildAdministrator object. * * @param ChildAdministrator $v * @return $this|\CyberdenBundle\Model\Session The current object (for fluent API support) * @throws PropelException */ public function setAdministrator(ChildAdministrator $v = null) { if ($v === null) { $this->setAdministratorId(NULL); } else { $this->setAdministratorId($v->getId()); } $this->aAdministrator = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildAdministrator object, it will not be re-added. if ($v !== null) { $v->addSession($this); } return $this; }