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