-->
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: how should I LEFT OUTER JOIN with HQL ?
PostPosted: Mon Sep 18, 2006 6:44 am 
Newbie

Joined: Mon Sep 18, 2006 6:28 am
Posts: 5
I have two tables transOrg and transEnt
both having the idEnt

How is supossed that I've to make the LEFT OUTER JOIN between the two tables

transOrg.hbm.xml

<hibernate-mapping>
<class name="com.mysystem.dto.transOrg" table="TRANS_TYPE_ORG" schema="TRANS_ADM">
<composite-id name="id" class="com.mysystem.dto.transOrgId">
<key-many-to-one name="transOrg" class="com.mysystem.dto.transOrg">
<column name="ID_ENT" length="5" />
</key-many-to-one>
</composite-id>
</class>
</hibernate-mapping>


myaction-servlet.xml

<entry key="orgList">
<bean parent="baseHibernateAdapter">
<property name="hql">
<value>
FROM
com.mysystem.dto.transOrg AS to,
com.mysystem.dto.transEnt AS te
LEFT OUTER JOIN
to.id.transOrg.transEnt.idEnt = te.id.transEnt.idEnt
</value>
</property>
</bean>
</entry>


this produces a NullPointer Exception
what I am missing ?

cheers,
teixi.


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.