I am querying over a RLMArray with objectsWhere and i get a RLMResults, but i need a RLMArray with the results a this point in my code.
private var data: RLMArray?
self.data = self.currentSubcategory!.datasheets // is a RLMArray
self.data = self.data!.objectsWhere("is_favourite = 1")
RLMArrayhas been split into two classes:RLMArrayandRLMResults.RLMArrayis now used only for to-many properties onRLMObjectclasses, whileRLMResultsis used for all of the querying and sorting methods. This was done to reflect that the two actually had fairly different APIs (for example,RLMResultsdoes not haveaddObject:), and they’re expected to diverge further as we add change notifications for queries.The migration for this should be as simple as replacing
RLMArraywithRLMResultsin all of the places that the compiler complains about.To go with this,
arraySortedByProperty:ascending:has been renamed tosortedResultsUsingProperty:ascending:, andaddObjectsFromArray:has been renamed toaddObjects:to reflect the fact that you can pass any enumerable object to it (such asNSArray,RLMArray, orRLMResults).
Source: http://realm.io/news/realm-cocoa-0.87.0/#rlmresults
Hope that's enough
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With