Hibernate version: 3.0
Hello everyone. I have a doubt.
I have the following SQL:
Code:
Query select = session.createQuery("from OrdemItens oi," +
" FichaTecnica f, " +
"MPFichaTecnica mpf " +
" where oi.ordemDeProducao.status <> 1 " +
" and oi.codigoLote = null " +
" and f.produto.produto = oi.produto.produto" +
" and mpf.fichaTecnica.fichaTecnica = f.fichaTecnica" +
" and mpf.principal = 1" +
" and mpf.materiaPrima.materia = ?" +
" order by oi.ordemDeProducao.numeroOrdem");
This query is executed successfully. I can see it on the logs, it apparently returns what I believe it should. The problem is that I'm not being able to access the classes properties.
I was used to do something like "from Classe a where a.blabla =2". Then, I would easily access it in my jsp, in a c:forEach, with a element.myResultList. But with my select, when I do the same I get the error:
Code:
javax.servlet.jsp.el.ELException: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.
I wanna iterate through the OrdemItens in the List, but I suppose it does not return me a OrdemItens List, and I don't really know what it returns and how I do to access what I want.
The thing is, I only need the other classes names there to make the joins, otherwise OrdemItens would be enough. But since that is what I have, how do I do to access what I want?
Thanks very much