I have a named query, which generates a temporary table:
Code:
<sql-query name="temp">
<![CDATA[
CREATE TEMPORARY TABLE tmp
SELECT
xx.id
FROM
xx
WHERE
xx.id = 250
</sql-query>
When I try to run this query with:
Query q = session.getNamedQuery("temp");
q.list();
I get an exception regarding no return values. I tried searching for other methods than q.list();, but found nothing.
I there some way of just executing a named query with no parameters.
By the way, I don't want to use regular JDBC connection, since I use Hibernate parameters mechanism, allowing me passing named parameters and use hibernate objects as query parameters.[/code]