android - Query using LIKE isn't working using GreenDAO -


i have table column string 3 characters, each character has value 0 or 1. i'd select rows according case.

i'd perform query that:

select * item group_type ? 

? can 100 or 101 or 011 or 111 or 001. combination 0 , 1 in 3 characters.

i'm trying query using like

wherecondition = null; switch (condition) {     case case1:         = itemdao.properties.grouptype.like("1%");         break;     case case2:         = itemdao.properties.grouptype.like("%1%");         break;     case case3:         = itemdao.properties.grouptype.like("%1");         break; } list<item> items = itemdao.querybuilder().where(where).list(); 

case1 returning starts 1 expected. case3 returning ends 1 expected. case2 returning everything! doesn't metter value in beggining, middle or end. it's returning everything.

case1 , case3 working fine. however, case2 isn't working. there problem that?


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -