-->
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: Left outer join in hql ???
PostPosted: Mon Nov 12, 2007 10:47 am 
Newbie

Joined: Mon Nov 12, 2007 10:22 am
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
version 3.1
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Help me !!!
Can I translate this sql query in hql:

I try to mapping this property with a formula in hbm.xml but the result is not a same.

select
Ordine.crete
from
tavc8200 Ordine inner join
tavc8220 ClienteOrdine
on Ordine.CID = ClienteOrdine.FK_8200_CID
inner join
tavc8210 RigaOrdine
on Ordine.CID = RigaOrdine.FK_8200_CID
left outer join
tmkt0009 AnagTestataModulo
on Ordine.crete = AnagTestataModulo.crete and RigaOrdine.ctestata = AnagTestataModulo.ctestata
left outer join
tmkt0022 PubblEmittComm
on Ordine.dcomanno = PubblEmittComm.ncommissione_anno
and
Ordine.ncomprog=PubblEmittComm.ncommissione_progressivo
and
RigaOrdine.nprricom =PubblEmittComm.ncommiss_riga_progressivo
where
Ordine.crete in ('C5', 'R4', 'K1', 'SA') and -- Reti
ClienteOrdine.ccliente = '1540118'

I found much problem with left outer Join with an 'And'

Sorry for my orrible english ^_^


Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


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.