public function filterByBrand($brand, $comparison = null)
    {
        if ($brand instanceof \Thelia\Model\Brand) {
            return $this
                ->addUsingAlias(DealerBrandTableMap::BRAND_ID, $brand->getId(), $comparison);
        } elseif ($brand instanceof ObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(DealerBrandTableMap::BRAND_ID, $brand->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByBrand() only accepts arguments of type \Thelia\Model\Brand or Collection');
        }
    }
public function filterByBrand($brand, $comparison = null)
    {
        if ($brand instanceof \Thelia\Model\Brand) {
            return $this
                ->addUsingAlias(DealerBrandTableMap::BRAND_ID, $brand->getId(), $comparison);
        } elseif ($brand instanceof ObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(DealerBrandTableMap::BRAND_ID, $brand->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByBrand() only accepts arguments of type \Thelia\Model\Brand or Collection');
        }
    }
public function filterByBrand ( $ brand , $ comparison = null ) { if ( $ brand instanceof \ Thelia \ Model \ Brand ) { return $ this -> addUsingAlias ( DealerBrandTableMap :: BRAND_ID , $ brand -> getId ( ) , $ comparison ) ; } elseif ( $ brand instanceof ObjectCollection ) { if ( null === $ comparison ) { $ comparison = Criteria :: IN ; } return $ this -> addUsingAlias ( DealerBrandTableMap :: BRAND_ID , $ brand -> toKeyValue ( 'PrimaryKey' , 'Id' ) , $ comparison ) ; } else { throw new PropelException ( 'filterByBrand() only accepts arguments of type \Thelia\Model\Brand or Collection' ) ; } }
Filter the query by a related \Thelia\Model\Brand object

@param \Thelia\Model\Brand|ObjectCollection $brand The related object(s) to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

@return ChildDealerBrandQuery The current query, for fluid interface
Filter the query by a related \ Thelia \ Model \ Brand object