Hi i got this error…
=>15:18:53,500 ERROR [STDERR] Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: on near line 1, column 341 [select h from Asignatura h where h.codigoAsignatura in (select t.grupoAsignaturaId.codigoAsignatura from GrupoAsignatura t where t.grupoAsignaturaId.codigoAsignatura in (SELECT v.codigoAsignatura FROM AsignaturaAula a left join Asignatura v on a.asignaturaAulaId.codigoAsignatura = v.codigoAsignatura where a.asignaturaAulaId.codigoAsignatura is NULL and v.escuelaDepartamento.codigoUnidadEscuela =6140 and v.estadoAsignatura.codigo = ‘1’) and t.grupoAsignaturaId.periodo = ‘1’ and t.grupoAsignaturaId.ano = ‘2010’)]
i have -many to one relation ‘codigoAsignatura’ from asignaturaAula to Asignatura
so i want to rewrite the Subquery like this:
SELECT v.codigoAsignatura
FROM AsignaturaAula a
join Asignatura v
left outer join a.asignaturaAulaId.codigoAsignatura
where a.asignaturaAulaId.codigoAsignatura is NULL
and v.escuelaDepartamento.codigoUnidadEscuela =6140
and v.estadoAsignatura.codigo = ‘1’
But no works, can u help me?
THX