开发者

Java: JDOQL startsWith query, case sensitive

开发者 https://www.devze.com 2022-12-30 16:42 出处:网络
I\'m using the .startsWith() filter in a JDOQL query but it\'s case sensitive. So start开发者_Go百科sWith(\"ab\") doesn\'t return \"Abc\" result and so on.

I'm using the .startsWith() filter in a JDOQL query but it's case sensitive. So start开发者_Go百科sWith("ab") doesn't return "Abc" result and so on.

Will I need to use a SQL query to avoid this ?


So combine it with toUpperCase() then perhaps field.toUpperCase().startsWith("AB")

Edit : fix method names

0

精彩评论

暂无评论...
验证码 换一张
取 消