> What's wrong with the query ?
It might be some problems in how did you map org.jbpm.taskmgmt.exe.ProcessInstance. It is not a problem of the query. But the query look really strange. It is joined by primary id's of both classes, you know it is quite unusual and might be a bug. Anyway in a hibernate it is better to join by using mapping properties. Something like this:
Code:
from TaskInstance t inner join t.processInstance p order by p.id desc
> but what kind of Object will this Query return ?
Upd.
This is wrong:
-- It will return objects of instance TaskInstance in both cases. ---
This is a quote from the book:
"A Cartesian product allows you to retrieve all possible combinations of instances of two or more classes. This query returns all ordered pairs of Users and Category objects:
Code:
from User, Category
Obviously, this generally isn’t useful. There is one case where it’s commonly used: theta-style joins."
So I suppose it will return List of Object[] where element at index 0 will be of the class TaskInstance and element at index 1 will be of the class ProcessInstance