0
good night.
I have a bean, which has an init() method. One of the objectives of this init is to bring the cycle that was opened according to the course of that user, that is, If there is no cycle or evaluation process involved with the course of that logged in user will not be shown any simulated for him to answer.
The problem is that you are giving my Query:
private List<Ciclo> ciclosCurso = new ArrayList<Ciclo>();
private void init(){
this.ciclosCurso = CicloDAO.buscaCicloPorCursoDoUsuario(codigoUsuario);
}
CYCLODAO:
@SuppressWarnings("unchecked")
public List<Ciclo> buscaCicloPorCursoDoUsuario(Long codigo) {
return manager
.createQuery("select c from Ciclo c JOIN curso_ciclo a WHERE CODIGO_CURSO = ?1")
.setParameter(1, codigo).getResultList();
}
This course table is a relationship between Course and Cycle of many for many, ie, @Manytomany
Give a query error,
ERROR: Path expected for Join! Oct 31, 2015 12:17:29 AM org.hibernate.hql.internal.Ast.Errorcounter reportError ERROR: Path expected for Join!
Missing clause
ON
of JOIN– ramaral