mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix like escaping for DB2, Oracle and MySql (#1162)
* Extended test case to show problem * FIX: Proper escaping of backslash in like/contains queries * Had to replace "like ?" assertions in tests with "like " as mysql will do a "like binary ? escape'|'" now to be case sensitive
This commit is contained in:
committed by
Rob Bygrave
parent
e4eca4bbe9
commit
1909ba1557
@@ -112,7 +112,7 @@ public class TestQuerySingleAttribute extends BaseTestCase {
|
||||
|
||||
List<String> names = query.findSingleAttributeList();
|
||||
|
||||
assertThat(sqlOf(query)).contains("select distinct t0.name from o_customer t0 left join o_address t1 on t1.id = t0.billing_address_id where t0.status = ? and lower(t1.city) like ?");
|
||||
assertThat(sqlOf(query)).contains("select distinct t0.name from o_customer t0 left join o_address t1 on t1.id = t0.billing_address_id where t0.status = ? and lower(t1.city) like ");
|
||||
assertThat(names).isNotNull();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user