Hibernate version: 3.0
Hello guys,
I'm getting the following error:
Code:
java.lang.RuntimeException: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [auge.bean.Lote#232]
at auge.conexao.OrdemItensService.getOrdemItensRotaList(OrdemItensService.java:229)
at auge.action.ListaOrdemItensRotaAction.execute(ListaOrdemItensRotaAction.java:65)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
I do know it happens because it tried to fetch an ID that doesn't exist. But the thing it that I needed it to ignore it instead of giving me an error.
My HQL is:
Code:
Query select = session.createQuery("from OrdemItens o where" +
" o.ordemDeProducao.status <> 1 " +
" order by o.lote, " +
" o.ordemDeProducao.numeroOrdem, " +
" o.numeroOrdemItens");
In the "order by o.lote" is that it's finding this error. The thing is that I'm working on an already existing database and I know that i WILL find this error. I wanted to find a way to ignore it, 'cause I can't fix it.
Is there a way? Or this will stop me from using hibernate?