Hello all,
I am trying to update a field(which is a string)in DB using hibernatewhich contails ' in it.(ex: it doesn't appear to be cost effective.).
But i am getting errors like:
18:58:12,107 ERROR [PARSER] line 1:261: unexpected token: t 18:58:12,107 ERROR [PARSER] line 2:39: unexpected token: could 18:58:12,107 ERROR [PARSER] line 2:62: unexpected token: right 18:58:12,123 ERROR [PARSER] line 2:103: unexpected token: seems 18:58:12,123 ERROR [PARSER] line 4:23: unexpected token: less 18:58:12,123 ERROR [PARSER] line 4:52: expecting IDENT, found '800' 18:58:12,123 ERROR [PARSER] line 5:33: unexpected token: cost 18:58:12,123 ERROR [PARSER] line 5:51: expecting IDENT, found '', public='' 18:58:12,138 INFO [STDOUT] org.hibernate.QueryException: expecting ''', found ' <EOF>' [update ideadetails set status='11',remarks='Idea: Remote configuration o f Drives using GSM
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorI pl.java:204) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImp .java:111) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanC che.java:72) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessi nImpl.java:133)
how to avoid this issue so that i can update any string which has ' in it. Could any one help me with this problem....
|