Hi,
I have a class, let's say Customer, that is mapped on a certain table.
I'd like to know how to write a HQL query that uses as condition a subquery on a table not mapped on a class.
Here is an example:
from Customer as customer where customer.name in (select my_column from my_unmapped_table)
When I try this query, Hibernate tries to map my_unmapped_table which I'm not interested to map.
More generally, is there a way to include in the HQL where clause some SQL text and instruct Hibernate to pass it as it is to the JDBC driver?
Thank you very much for your help.
|