character « HQL « JPA Q&A

1. special characters in HQL

hi i'm trying to get from a mySql DB a query using Hibernates HQL *

public String getDetailsByUserAndFullPath(String user,String fullpath) {
    String temp2 = "%" + user + "%";

2. Special characters in hql

Hey guys, I have a bunch of hql statements that my site uses. Often these queries are made from input on the web page. For something like a description field it is not unusual to have an apostrophe (') in the query. SQL does not like this one bit, and yells at me for it every time. Any suggestions on how ...

3. Hibernate HQL and special characters

Good evening lords and ladies. I'm working with an SQLServer legacy database, it's fields are plenty of bad encoded characters and not so bad encoded characters. Like this: ZU#IGA ZU'IGA ZUIGA ZU=IGA ZUIGA ZU?IGA ZUIGA ZUIGA ZUIGA All surenames refer to Zuiga surname, if I write a query changing the problematic characters by "_" underscore, the HQL query finds all possible ...