All,
I have a very general question: In Hibernate, how to handle the special characters in the HQL?

The problem I am having is: I am working on a project and using Oracle as the backend data storage and Hibernate as the ORM solution. In the HQL, for some String attributes, we have ' in the String (for example, in the WHERE clause, we have something like where product_name='Bauer's Hibernate in Action book') as the value. The Oracle database sees ' in the Bauer's as the end of the String that causes an QueryException. I can write a filter to convert Bauser's to Bauer\''s. But I think Hibernate must have someway to handle these special characters already. Is there anybody there can point out to how to handle these database related special characters in HQL? Any suggestions will be greatly appreciated!!

Thanks in advance!
All,
I have a very general question: In Hibernate, how to handle the special characters in the HQL?

The problem I am having is: I am working on a project and using Oracle as the backend data storage and Hibernate as the ORM solution. In the HQL, for some String attributes, we have ' in the String (for example, in the WHERE clause, we have something like where product_name='Bauer's Hibernate in Action book') as the value. The Oracle database sees ' in the Bauer's as the end of the String that causes an QueryException. I can write a filter to convert Bauser's to Bauer\''s. But I think Hibernate must have someway to handle these special characters already. Is there anybody there can point out to how to handle these database related special characters in HQL? Any suggestions will be greatly appreciated!!

Thanks in advance!