Hi,
[skip that intro if you wish]
I am currently using hibernate for the first time in a project, after seeing Gavin and Micheal speaking so dearly about it at Javapolis and JavaOne, I finally made the step, and I must say: GREAT! Thanks...
Still, I hae to get back to good ol' SQL for one particular job that builds a complex SQL query that I don't think could be made in HQL (special functions) and even if I could work I around that, I had no clue how to still do it in HQL and will leave that for later, when I've got more skills with Hibernate
[actual question]
Now the thing is as follows: I build up union'ed queries as one of the subqueries using an LIKE clause with words. Is there a way to escape these, as would be done using a preparedStatement?
Don't know if that's a Dialect dependent thing, but it would be one thing less to think about when migrating database (if that should ever happen, still the query would probably not run anymore as is anyway).
So is there a way to escape "Strings" on a SQL query using the Hibernate API?
Thanks for replying and thanks for Hibernate to the team (not useful, but I believe it's always nice to hear it),
Alex
|