public function isFavorite(\Eccube\Entity\Customer $Customer, \Eccube\Entity\Product $Product)
{
$qb = $this->createQueryBuilder('cf')->select('COUNT(cf.Product)')->andWhere('cf.Customer = :Customer AND cf.Product = :Product')->setParameters(array('Customer' => $Customer, 'Product' => $Product));
$count = $qb->getQuery()->getSingleScalarResult();
return $count > 0;
}