<?php

namespace Eater\Glim\Model;

use Eater\Glim\Model\Base\CertificateQuery as BaseCertificateQuery;

/**
 * Skeleton subclass for performing query and update operations on the 'Certificate' table.
 *
 *
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 */
class CertificateQuery extends BaseCertificateQuery
{
    /**
     * @param User $user
     * @param string $name
     * @throws \Propel\Runtime\Exception\PropelException
     * @return Certificate
     */
    public function findOneByUserAndName($user, $name)
    {
        return $this->filterByName($name)
            ->filterByUser($user)
            ->findOne();
    }
}
