Ver Mensaje Individual
  #7 (permalink)  
Antiguo 10/11/2012, 07:20
Avatar de Fuzzylog
Fuzzylog
 
Fecha de Ingreso: agosto-2008
Ubicación: En internet
Mensajes: 2.511
Antigüedad: 15 años, 7 meses
Puntos: 188
Respuesta: Problema en consulta JPQL con IS NULL en JPA

Igual para que te funcione la primera condicion deberia ser tal que así

Select a from Actividad a where a in (select a2 from Actividad a2 where a2.usuario IS NULL)

Y la segunda según dices está bien...

asi que quedaría algo como:

Select a from Actividad a where a in ( select a1 from Actividad a1 where a1.usuario IS NULL ) OR a.usuario in ( select a2.usuario from Actividad a2 where a2.usuario.nombre LIKE :nombre );

Donde tienes que hacer un replace con el setParameter para poner el nombre del usuario.
__________________
if (fuzzy && smooth) {
fuzzylog = "c00l";
return true;
}