/** * Filter the query by a related \Account object * * @param \Account|ObjectCollection $account 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 ChildProfileQuery The current query, for fluid interface */ public function filterByAccount($account, $comparison = null) { if ($account instanceof \Account) { return $this->addUsingAlias(ProfileTableMap::COL_ID, $account->getId(), $comparison); } elseif ($account instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ProfileTableMap::COL_ID, $account->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByAccount() only accepts arguments of type \\Account or Collection'); } }