public function filterByC2M($c2M, $comparison = null)
    {
        if ($c2M instanceof \Attogram\SharedMedia\Orm\C2M) {
            return $this
                ->addUsingAlias(CategoryTableMap::COL_ID, $c2M->getCategoryId(), $comparison);
        } elseif ($c2M instanceof ObjectCollection) {
            return $this
                ->useC2MQuery()
                ->filterByPrimaryKeys($c2M->getPrimaryKeys())
                ->endUse();
        } else {
            throw new PropelException('filterByC2M() only accepts arguments of type \Attogram\SharedMedia\Orm\C2M or Collection');
        }
    }