Chathuranga Shan
Chathuranga Shan

Reputation: 193

Why not equal function not working this realm query

I have to below simple query to filter search result form local realm data base on android application for some reason this notEqualTo() function not working correctly. please refer below debug screen shot.

enter image description here

As you can see in query result set we should not get a result which code equal "CMB" what am I doing wrong here ?

Upvotes: 0

Views: 1224

Answers (1)

Chathuranga Shan
Chathuranga Shan

Reputation: 193

Found the solution.

data = realm
       .where(DestinationTable.class)
       .notEqualTo("code",otherSelectedAirport)
       .beginGroup()
       .like("country", newText+"*", Case.INSENSITIVE)
       .or()
       .like("label", newText+"*", Case.INSENSITIVE)
       .endGroup()
       .findAll();

Upvotes: 1

Related Questions