HQL excluding between tables

1

I need a pair of excludable Querys to check a "availability" factor within a db.

It is worth the query so far I have been posing in various ways and I think, this is the most correct but I still give error

    from Usuario judge where judge.juez = 1 and judge.idusuario  not in Usuariomaraton

Someone could tell me what is missing from the query so I can not extract what I'm looking for (All users that have judge 1 value and are not in the Usuariomaraton table).

    
asked by Francrt 24.04.2018 в 09:38
source

1 answer

0

Friend looks in sql it would be like this

select * from Usuario judge where judge.juez = 1 and judge.idusuario  not in 
(select idusuario from Usuariomaraton)

If you notice the 'in' I associate it with a query and not with an object, check the documentation subqueries link

    
answered by 13.07.2018 / 14:54
source