Link to home
Start Free TrialLog in
Avatar of tmitch1968
tmitch1968

asked on

How to combine the results of two HQL queries into one

I have two HQL queries that I need to combine into a single set of results.

Both ObjectOne and ObjectTwo are derived from the same base class. ObjectOne has

The first query is...

SELECT
    //Some things
FROM

ObjectOne objectOne,
ObjectTwo objectTwo

WHERE
objectOne in elements(objectTwo.components)
And the second query is...

SELECT
    //Some things
FROM

ObjectOne objectOne
LEFT OUTER JOIN objectOne.parentObject parentObj
WHERE parentObj.myField is null


Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of Naitik Gamit
Naitik Gamit
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial