-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with join conditions
PostPosted: Thu Jun 14, 2007 6:48 am 
Newbie

Joined: Thu Mar 08, 2007 8:49 am
Posts: 11
Location: Hyd
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?

_________________
Thanks&Regards
Sunil k


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.