Cercando un pò su google avevo trovato che era possibile effettuare una query utilizzando l'operatore NOT IN creando una namedquery ddel tipo:
e poi da un sesionbean:codice:@NamedQuery(name= "TEST", query="SELECT u FROM Utente u WHERE u.id NOT IN (:lista_utenti)")
dove list è una List<Integer>codice:Query q=... q.setParameter("lista_utenti",list); ...
Solo che quando eseguo la query questo è il risultato:
codice:java.lang.IllegalArgumentException: You have attempted to set a value of type class java.util.List for parameter lista_utenti with expected type of class java.lang.Integer from query string SELECT u FROM Utente u WHERE u.id NOT IN (:lista_utenti).

Rispondi quotando

Grazie è andato! 