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?
|