The Hibernate documentation states in chapter 9 (Hibernate Query Language)

"Multiple classes may appear, resulting in a cartesian product or "cross" join.

from Formula, Parameter

from Formula as form, Parameter as param"

A bit later something similar:
"select cat, count( elements(cat.kittens) ) from eg.Cat cat group by cat"

It is not clear to me what the result of such a query would be. What type would be the contents of the objects contained by the collection returned by the query's list() or iterate() methods.

For example let's assume I've executed the "cat" query:

session = ...
query = session.getNamedQuery("Cat_and_kitten_count");

iterator = query.iterate();

while (iterator.hasNext()) {
        Object element;

        element = iterator.next();
        // what type is element?
        // How to get the cat and the kitten count?
}

At the moment I don't have an infrastructure to try this easily on and this problem is nagging my mind...

Maurice.








------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to