【发布时间】:2015-02-28 13:50:49
【问题描述】:
我在 ormlite 和 Mysql 中使用以下查询:
String _textSearch="%اعصاب%";
Where<QuestionEntity, Long> _where= getDao().queryBuilder()).where();
List<QuestionEntity> _lst= _where.or(_where.like("title",_textSearch ),
_where.like("questiontext", _textSearch)).query();
但生成以下查询:
SELECT * FROM `question`
WHERE (`title` LIKE '%?????%' OR `questiontext` LIKE '%?????%' )
为什么?
【问题讨论】:
-
了解如何配置 ormlite 以使用 utf8。
-
您对查询的看法如何?在日志中?