library/Extlib/Validate/Doctrine/DoctrineAbstract.php
protected function prepeareQuery($value)
    {
        $query = \Doctrine_Query::create($this->getConnection())
                ->select($this->getField())
                ->from($this->getTable())
                ->where(sprintf('%s = ?', $this->getField()), $value);

        foreach ($this->getExclude() as $exclude => $value) {
            $query->andWhere(sprintf('%s != ?', $exclude), $value);
        }

        foreach ($this->getInclude() as $include => $value) {
            $query->andWhere(sprintf('%s = ?', $include), $value);
        }

        return $query;
    }
protected function prepeareQuery($value)
    {
        $query = \Doctrine_Query::create($this->getConnection())
                ->select($this->getField())
                ->from($this->getTable())
                ->where(sprintf('%s = ?', $this->getField()), $value);

        foreach ($this->getExclude() as $exclude => $value) {
            $query->andWhere(sprintf('%s != ?', $exclude), $value);
        }

        foreach ($this->getInclude() as $include => $value) {
            $query->andWhere(sprintf('%s = ?', $include), $value);
        }

        return $query;
    }
protected function prepeareQuery ( $ value ) { $ query = \ Doctrine_Query :: create ( $ this -> getConnection ( ) ) -> select ( $ this -> getField ( ) ) -> from ( $ this -> getTable ( ) ) -> where ( sprintf ( '%s = ?' , $ this -> getField ( ) ) , $ value ) ; foreach ( $ this -> getExclude ( ) as $ exclude => $ value ) { $ query -> andWhere ( sprintf ( '%s != ?' , $ exclude ) , $ value ) ; } foreach ( $ this -> getInclude ( ) as $ include => $ value ) { $ query -> andWhere ( sprintf ( '%s = ?' , $ include ) , $ value ) ; } return $ query ; }
Prepare validate query

@param mixed $value
@return \Doctrine_Query
Prepare validate query