-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: # sign within where clause
PostPosted: Wed Feb 21, 2007 10:50 am 
Newbie

Joined: Fri Jun 03, 2005 11:36 am
Posts: 8
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

_________________
I've got that sunny bunny feeling.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 22, 2007 10:03 am 
Newbie

Joined: Fri Jun 03, 2005 11:36 am
Posts: 8
Bump. Can anyone help? Thanks.
-pD

_________________
I've got that sunny bunny feeling.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.