Hi, All

How can I use subqueries in the select clause?

SQL query like that:
select
    t1.*,
    (select count(*) from t2 where t1.id=t2.id_t1)
from
    t1
executes faster, than "group by"-styled query from t2, on my SQL server.
But I don't know how I can write such query in HQL.

Only solution that I find is to use: formula="_subquery_" in "property" tag
of
hibernate mapping file.

Boris



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to