Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/09/2015, 02:19
Avatar de Profesor_Falken
Profesor_Falken
 
Fecha de Ingreso: agosto-2014
Ubicación: Mountain View
Mensajes: 1.323
Antigüedad: 9 años, 8 meses
Puntos: 182
Respuesta: Ejb sql con columnas calculadas

Cita:
Gracias por responder... trabajo con un resultList por que recupero una lista no un simple resultado
Por mucho que quieras que JPA haga magia, estas llamando a una funcion de agregacion(COUNT). Eso no devuelve nunca una lista, sino un valor numerico.
http://www.objectdb.com/java/jpa/query/execute

Cita:
The following aggregate query always returns a single result object, which is a Long object reflecting the number of Country objects in the database:

Un saludo
__________________
If to err is human, then programmers are the most human of us