• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate criteria query for Oracle special characters

 
manish ahuja
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have a Criteria query in Hibernate. In some cases the query column parameter data has actual Oracle substitution variable ampersand (&).

eg) name= "AB&C"

Due to this the query blows when interacting with an Oracle database.

How can this be handled in the Hibernate layer.

Let me know your thoughts.


Regards,

M
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This seems a little odd. Criteria queries should be using parameter binding which means this will not happen. Can you post your code?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic