Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]3.0[/b]
[b]Mapping documents:[/b]
[b]select pro.productName,br.buyRateFormula from ProductsVO as pro left join pro.branchRates as br with pro.ehCode=1[/b]
[b]org.hibernate.hql.ast.QuerySyntaxError: unexpected token: with near line 1, column 119 [select pro.productName,br.buyRateFormula from com.ifacts.vo.masters.ProductsVO as pro left join pro.branchRates as br with pro.ehCode=1]
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at test.outerjointest(test.java:97)
at test.main(test.java:46)
Caused by: line 1:119: unexpected token: with
at org.hibernate.hql.antlr.HqlBaseParser.fromJoin(HqlBaseParser.java:1380)
at org.hibernate.hql.antlr.HqlBaseParser.fromClause(HqlBaseParser.java:1053)
at org.hibernate.hql.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java:759)
at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:611)
at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:263)
at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:150)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:209)
... 8 more
b]
[b]Oracle 10g[/b]
[b]The generated SQL (show_sql=true):[/b]
[b]Debug level Hibernate log excerpt:[/b]
I am using hibernate3.0.
I got probelm in Left outer join, with the keyword "with"
my query is
select pro.productName,br.buyRateFormula from ProductsVO as pro left join pro.branchRates as br with pro.ehCode=1
If i remove the with it is wotking fine. But i want to impose some conditions.
Can any one help me pls?