-->
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 do I right outer join an hibernate created statement?
PostPosted: Tue Jul 19, 2005 11:07 pm 
Newbie

Joined: Mon Jun 27, 2005 10:29 am
Posts: 4
Hibernate version: 2

I have a little problem in a query of mine that is more or less like this: There is a pojo called Event and another one called PublicSession which extends Event. Both Event and PublicSession are stored in a table called EVENT_INFO, and hibernate knows that an Event is a PublicSession if the TYPE column contains the value 'SP'. Inside PublicSesion a have a field called process, that is an instance of my Process pojo.

I am trying to create a query that will return me all the process and if possible the info about it's PublicSession. So, I thought all I had to do was use a right outer join to make PublicSession optional and that would be it. Problem: when hibernate generates the query it creates a statement like this: "and ev.TYPE = 'SP'" (ev is the alias to EVENT_INFO). Since there is no right outer join here my query is not returning the all the process it should, only those that have a PublicSession (if I execute the query manually and insert an NVL here the query works perfectly).

Any ideias on how to solve this?


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.