/** * Filter the query by a related GalleryImageSize object * * @param GalleryImageSize|PropelObjectCollection $galleryImageSize the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return GalleryImageQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByGalleryImageSize($galleryImageSize, $comparison = null) { if ($galleryImageSize instanceof GalleryImageSize) { return $this->addUsingAlias(GalleryImagePeer::ID, $galleryImageSize->getGalleryImageId(), $comparison); } elseif ($galleryImageSize instanceof PropelObjectCollection) { return $this->useGalleryImageSizeQuery()->filterByPrimaryKeys($galleryImageSize->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByGalleryImageSize() only accepts arguments of type GalleryImageSize or PropelCollection'); } }