|
We have recently migrated from hibernate 2.1 to 3.0 version, while migrating we faced the following issues unresolved. Thanks to hibernate since the document provides the basic migration steps.
The given query threw exception while parsed by hibernate 3.0
SELECT indv,a, p , indv1.firstName, indv1.lastName, indv2.firstName, indv2.lastName FROM com.domain.IndividualXAddress i,com.domain.Address a, com.domain.User indv, com.domain.User indv1,com.domain.User indv2 , com.domain.Payer p WHERE i.userId = indv.userId AND i.addressId = a.addressId AND indv.companyId = p.companyId AND indv.approverUserId = indv1.userId(+) AND indv.adminUserID = indv2.userId(+) AND i.isDefault = 'T' AND indv.userId = :userId AND indv.status IN ('A','I') 15:43:50:975 - ERROR - ? - line 1:457: unexpected token: ) 15:43:51:007 - DEBUG - ? - line 1:457: unexpected token: ) line 1:457: unexpected token: ) org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3223) at org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3173) at org.hibernate.hql.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:3098) at org.hibernate.hql.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2818)
It seems + operator causing this issue. It was failing though I changed to JOINs.
Is there anything wrong in the query?
Please throw some light on this as this urgent.
|