hi
i'm using this code:
Code:
"select elements(turma.q5) from Turma turma";
and get this error:
Quote:
net.sf.hibernate.QueryException: dereferenced: turma0_.q5.elements [select elements(turma.q5) from escola.Turma turma]
at net.sf.hibernate.hql.PathExpressionParser.token(PathExpressionParser.java:140)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.SelectParser.token(SelectParser.java:154)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.ClauseParser.end(ClauseParser.java:114)
at net.sf.hibernate.hql.PreprocessingParser.end(PreprocessingParser.java:143)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:30)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:293)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1554)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1525)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1505)
at escola.TesteComVisual.listaEpocas(TesteComVisual.java:135)
at escola.TesteVisual.lmEpocas(TesteVisual.java:17)
at escola.TesteVisual.<init>(TesteVisual.java:43)
at escola.teste.<init>(teste.java:11)
at escola.teste.main(teste.java:41)
I'm using hibernate 2.1 with MySql 2.0.12-nt.
I simply want to get all values from column q5 from Turma table.
Turma bellongs to Relatorio, and this one bellongs toUtilizador
Voil