Uploaded image for project: 'Realm Cocoa SDK'
  1. Realm Cocoa SDK
  2. RCOCOA-190

Support custom locales in case-insensitive queries

      [c] doesn't support Russian language

      func searchAutocompleteEntriesWithSubstring(substring: String) {
          suggestions.removeAll()
      
          let realmSuggestions = realm.objects(Cities).filter("ru BEGINSWITH[c] '\(substring)'")
          for suggestion in realmSuggestions {
              suggestions.append(suggestion.valueForKey("ru") as! String)
          }
          suggestionsTableView.reloadData()
      }
      

      In English it works as expected

      func searchAutocompleteEntriesWithSubstring(substring: String) {
          suggestions.removeAll()
      
          let realmSuggestions = realm.objects(Cities).filter("en BEGINSWITH[c] '\(substring)'")
          for suggestion in realmSuggestions {
              suggestions.append(suggestion.valueForKey("en") as! String)
          }
          suggestionsTableView.reloadData()
      }
      

      Please fix.

      Realm 0.96.2 / Xcode 7.1 / OSX 10.11.1
      You can find me on Facebook for further assistance.

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: