Problem: Assume some of the resources in your inventory contain the "_" character. Trying to search for those resources using a term which include "_" in either the Browse Resources page or via a Dyna group doesn't show any matching resources. We should make sure to test the fix with any other special characters e.g. *, %, &, \, / and also across all supported database options (1:11:35 PM) joseph: yeah, we may not be escaping special chars properly (1:11:41 PM) joseph: i'm looking at code now ccrouch (1:11:53 PM) ghinkle: um _ is a special character in jpql (1:12:05 PM) ghinkle: it means match one character (1:12:23 PM) ccrouch: some escaping is in order i think (1:13:51 PM) joseph: go here http://jon06.mw.lab.eng.bos.redhat.com:7080/admin/test/hibernate.jsp (1:14:01 PM) joseph: execute select res.name from Resource res where res.name like '%\_3%' (1:16:02 PM) joseph: but this works select res.name from Resource res where res.name like '%\_3%' escape '\' (1:16:26 PM) joseph: so, our PersistenceUtility is properly escaping underscores, but we're not giving the hint for what the escape character is (1:17:30 PM) ccrouch: ok, sounds like a jira :-) (1:17:39 PM) ccrouch: but i guess for now there is no workaround? (1:17:43 PM) ccrouch: just avoid using _ ? (1:17:53 PM) joseph: lemme reference some doco (1:23:23 PM) joseph: don't see any workarounds (1:24:46 PM) ccrouch: joseph: ok thanks for investigating (1:25:15 PM) joseph: can't believe this has been like that for...well...ever
(1:33:39 PM) joseph: ccrouch: and now criteria queries too
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2284
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs. keyword: new = Tracking + FutureFeature + SubBug
making sure we're not missing any bugs in rhq_triage
jshaughn - is this fixed? add commit and close out
This should have gotten fixed a while back when I overhauled the ESCAPE clause stuff in our Criteria query generator. But since this fix would be a side-effect of that work I'd say it should go to QA for verification and not yet be closed.