Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 2.1
Name and version of the database you are using: Mysql 5
Debug level Hibernate log excerpt:
DEBUG 2007-02-21 09:36:13,242 QueryTranslator.java logQuery (net.sf.hibernate.hql.QueryTranslator.logQuery(QueryTranslator.java:207)) - HQL: from us.fl.ci.tlh.mobile.data.TWorkorder where address = "W 4th Ave # A6" and addressnum = "412" and statusid in (6, 3, 5, 2, 4) and sourcesystem = "CIS"
DEBUG 2007-02-21 09:36:13,258 QueryTranslator.java logQuery (net.sf.hibernate.hql.QueryTranslator.logQuery(QueryTranslator.java:208)) - SQL: select tworkorder0_.mobileWoId as x0_0_ from t_workorder tworkorder0_ where (address="W 4th Ave#A6" )and(addressnum="412" )and(statusid in(6 , 3 , 5 , 2 , 4))and(sourcesystem="CIS" )
Hello friends -
The two debug statements above pretty much say it all. If my where clause contains a '#' in it, the value goes from 'W 4th Ave # A6' to 'W 4th Ave#A6', and I get no hits.
A hack solution involving replacing '#' values in the database is available to me, but I'd much rather see if there is a more graceful solution to this, as well as understand if there are other characters that will cause similar problems in the future.
Thank you!
pD