/** * Filter the query by a related \Models\Notification object * * @param \Models\Notification|ObjectCollection $notification the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildUserQuery The current query, for fluid interface */ public function filterByNotificationRelatedByUserId($notification, $comparison = null) { if ($notification instanceof \Models\Notification) { return $this->addUsingAlias(UserTableMap::COL_ID, $notification->getUserId(), $comparison); } elseif ($notification instanceof ObjectCollection) { return $this->useNotificationRelatedByUserIdQuery()->filterByPrimaryKeys($notification->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByNotificationRelatedByUserId() only accepts arguments of type \\Models\\Notification or Collection'); } }