Search code examples
javaandroidrealm

Java Android Realm contains


I want to get a result with contains with world I do this ;

  public static RealmResults<WyborTrasyRealm> getFiltrWyborTrasyLists(Realm realm,String column, String filtr) {
        return realm.where(WyborTrasyRealm.class).contains(column,filtr).findAll();
    }

But when I have a row with name : TAG and when I in constains have

realm.where(WyborTrasyRealm.class).contains(name,"tag").findAll();

I get an empty list how I can ignore case in realm ?


Solution

  • I do this and it works :

     public static RealmResults<WyborTrasyRealm> getFiltrWyborTrasyLists(Realm realm,String column, String filtr) {
            return realm.where(WyborTrasyRealm.class).contains(column,filtr,  Case.INSENSITIVE).findAll();
        }