-->
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.  [ 4 posts ] 
Author Message
 Post subject: Help:about outer join in HQL
PostPosted: Wed Feb 25, 2004 12:20 am 
Newbie

Joined: Wed Feb 25, 2004 12:13 am
Posts: 2
Code:
net.sf.hibernate.QueryException: outer or full join must be followed by path expression [select contact.coi_name,client.cli_cncompanyname from  net.isquare.imiracle.client.po.ContactInfoPO as contact  join net.isquare.imiracle.client.po.ClientInfoPO as client on contact.client.cli_id=client.cli_id]

Code:
Query q = session.createQuery("select contact.coi_name,client.cli_cncompanyname from  net.isquare.imiracle.client.po.ContactInfoPO as contact  join net.isquare.imiracle.client.po.ClientInfoPO as client on contact.client.cli_id=client.cli_id");// where 1=1" + queryStr);

clientinfo hbm:
Code:
<set name="contact" lazy="true" inverse="true" cascade="all" >
   <key column="cli_id"/>
   <one-to-many class="net.isquare.imiracle.client.po.ContactInfoPO"/>
</set>

contactinfo hbm:
Code:
<many-to-one name="client" class="net.isquare.imiracle.client.po.ClientInfoPO" >
<column name="cli_id"/>
</many-to-one>
      


Top
 Profile  
 
 Post subject: Re: Help:about outer join in HQL
PostPosted: Wed Feb 25, 2004 8:21 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Code:
select contact.coi_name,client.cli_cncompanyname from  net.isquare.imiracle.client.po.ContactInfoPO as contact  join contact.client as client

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2004 3:49 am 
Newbie

Joined: Wed Feb 25, 2004 12:13 am
Posts: 2
no use, the exception persists


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2004 7:09 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Did it in the wrong side

Code:
select contact.coi_name,client.cli_cncompanyname from  net.isquare.imiracle.client.po.ClientInfoPO as client join client.contact as contact

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.