简体   繁体   中英

Query on relationship objects in realm

I have to classes stored using Realm.io (and therefore extending RLMObject) : class A and B, with class A having a property of type B. I would like to query all objects of class A where AbpropertyX=something, but I can't get it working. Maybe is it not even possible ?

Realm v0.81.0 now supports querying over a relationship. Here's how it works:

[A objectsWhere:@"b.propertyX == 'something'"]

or

[Person objectsWhere:@"ANY dogs.name == 'Alfonso'"]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM