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