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