-->
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.  [ 2 posts ] 
Author Message
 Post subject: [newbie] doubt in implementing QUERY which uses JOIN
PostPosted: Tue Jan 11, 2005 12:38 pm 
Newbie

Joined: Sat Dec 25, 2004 5:25 am
Posts: 2
Location: Pune
Hibernate version: 2.1.7

Hi... i am new to hibernate and i was trying to implement following query with database on MS SQL Server 2000.

Query:

SELECT d.PageName, d.IllustrationID, d.PageUID FROM
com.toro.enterprise.oag.base.v1_0.tblPage4Pub.Page4Pub c INNER JOIN com.toro.enterprise.oag.base.v1_0.tblPage.Page d
ON c.PageID = d.PageUID


The stack trace is as follows

net.sf.hibernate.hql.QueryTranslator - compiling query
net.sf.hibernate.QueryException: outer or full join must be followed by path expression [ Select d.PageName, d.IllustrationID, d.PageUID FROM com.toro.enterprise.oag.base.v1_0.tblPage4Pub.Page4Pub c INNER JOIN com.toro.enterprise.oag.base.v1_0.tblPage.Page d on c.PageID = d.PageUID]
at net.sf.hibernate.hql.FromParser.token(FromParser.java:166)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:293)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1561)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1591)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1581)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1573)
at src.DrawingTest.main(DrawingTest.java:72)


Can anyone PLEASE tell where am i going wrong??? Is the syntax of the query wrong or do i need to set anything in hibernate properties file???


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 11, 2005 12:53 pm 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
What is the relationship between Page4Pub and Page? Show your mapping documents.[/code]


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

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.