• 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?
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!