O projeto importa este projeto com.trg.search.Search
select * from ( select * from CL cl_
where cl_.ATIVO=1
and not (exists (select listacli1_.CLI_ID from CLI_FID listacli1_
where cl_.CLI_ID=listacli1_.CLIENTE_ID and ( listacli1_.ATIVO=1)
and (listacli1_.EMPRESA_ID<>10 or listacli1_.EMPRESA_ID is null)))
order by cliente0_.NOMBCLIENTE asc ) where rownum <= 10;
Mas quero que gere assim:
select * from ( select * from CL cl_
where cl_.ATIVO=1
and (exists (select listacli1_.CLI_ID from CLI_FID listacli1_
where cl_.CLI_ID=listacli1_.CLIENTE_ID and ( listacli1_.ATIVO=1)
and (listacli1_.EMPRESA_ID<>10 or listacli1_.EMPRESA_ID is null)))
order by cliente0_.NOMBCLIENTE asc ) where rownum <= 10;