Android ormlite like() function is not working

//http://stackoverflow.com/questions/7642161/android-ormlite-like-function-is-not-working

try {
    QueryBuilder<MakeDTO, Integer> qb = makeDao.queryBuilder();
    qb.where().like("madeCompany", "%"+filterKey+"%");
    PreparedQuery<MakeDTO> pq = qb.prepare();
    return makeDao.query(pq);
} catch (SQLException e) {
    throw new AppException(e);
}

http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/stmt/Where.html

 

 

 Where<T,ID> like(String columnName, Object value) 
          Add a LIKE clause so the column must mach the value using '%' patterns.

 

 Where<T,ID> like(String columnName, Object value) 
          Add a LIKE clause so the column must mach the value using '%' patterns.
posted @ 2014-08-18 16:57  wanqi  阅读(1033)  评论(0编辑  收藏  举报