NO FUNCIONA
protected function enhanceQueryBuild(QueryBuilder $queryBuilder, ICriteria $criteria){
$oid = $criteria->getOidNotEqual();
if( !empty($oid) ){
$queryBuilder->andWhere( "u.oid <> :oid");
$queryBuilder->setParameter( "oid" , $oid );
}
$username = $criteria->getUsername();
if( !empty($username) ){
$queryBuilder->andWhere("u.username = :username")->setParameter("username", $username);
}
FUNCIONA
protected function enhanceQueryBuild(QueryBuilder $queryBuilder, ICriteria $criteria){
$oid = $criteria->getOidNotEqual();
if( !empty($oid) ){
$queryBuilder->Where( "u.oid <> :oid");
$queryBuilder->setParameter( "oid" , $oid );
}
$username = $criteria->getUsername();
if( !empty($username) ){
$queryBuilder->Where("u.username = :username")->setParameter("username", $username);
}
Me podrían ayudar?
Muchas gracias