public function filterBySource($source, $comparison = null)
    {
        if ($source instanceof \Attogram\SharedMedia\Orm\Source) {
            return $this
                ->addUsingAlias(CategoryTableMap::COL_SOURCE_ID, $source->getId(), $comparison);
        } elseif ($source instanceof ObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(CategoryTableMap::COL_SOURCE_ID, $source->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterBySource() only accepts arguments of type \Attogram\SharedMedia\Orm\Source or Collection');
        }
    }