From: Steve E. (JIRA) <no...@at...> - 2006-06-28 05:24:02
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1847?page=all ] Steve Ebersole resolved HHH-1847: --------------------------------- Fix Version: 3.2.0 Resolution: Fixed Assign To: Steve Ebersole applied. thanks. > QBE 'like' clause with backslashes don't work with MySQL > -------------------------------------------------------- > > Key: HHH-1847 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1847 > Project: Hibernate3 > Type: Patch > Components: query-criteria > Versions: 3.2.0.cr2 > Environment: 3.2.0.cr2, JBoss AS 4.0.4, MySQL 4.x or 5.x > Reporter: Scott Marlow > Assignee: Steve Ebersole > Fix For: 3.2.0 > Attachments: Example-patch.txt, LikeExpression-patch.txt, QueryCacheTest-patch.txt > > > MySQL supports backslashes in the 'like' clause as a special escape character for expressing newline characters. Many applications will want to disable this functionality in MySQL which can be done by specifying the escape character value as empty string or some other value. > MySQL support recommends that customers either double up their backslashes or use the escape clause to specify a different escape character value than backslash. > This patch adds a new method SetEscapeCharacter to org.hibernate.criterion.Example. This is only used if the 'like' clause option is enabled. Also added is org.hibernate.criterion.LikeExpression. A new test case is added (for MySQL only) to org.hibernate.test.querycache.QueryCacheTest. > Example.setEscapeCharacter allows a value to be specfied that will be used as the new escape character for the like clause. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |