-->
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: where clause and left join
PostPosted: Mon Feb 13, 2006 1:07 pm 
Senior
Senior

Joined: Wed Sep 24, 2003 3:01 pm
Posts: 158
Location: Bragan�a Paulista - Brasil
Hi all,

I´m using Oracle 9 and Hibernate 2.1.4.

I have the following query in Oracle:

Code:
1   select count(*) from
2   viagem v, cartao c
3   where c.pan = v.pan(+)
4   and c.id_cartao_tipo = 2
5   and v.id_viagem_status(+) = 5 // I need this in HQL


this query returns 20 rows.

How can I do the where clause like the line 5 above
using Hibernate?

in HQL:

Code:
select count(c.pan)
from card
left join c.trips t
where c.cardType.idCardType = 2
and and t.tripStatus.idTripStatus = 5


this HQL returns 0 rows.

thanks

_________________
Tads


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.