为什么链接对象属性不能用于此查询?

时间:2016-02-01 22:27:29

标签: ios realm

为什么此查询会抛出该演示文稿不属于PresentationSpeaker的属性?

var result = realm.objects(PresentationSpeaker.self).sorted(sortProperties)

if searchTerm != nil && !(searchTerm!.isEmpty) {
    result = result.filter("fullName CONTAINS [c]%@ or ANY presentations.event.name CONTAINS [c]%@ ", searchTerm!, searchTerm!)
}

实体定义

public class PresentationSpeaker: Person {
    public var presentations: [Presentation] {
        return linkingObjects(Presentation.self, forProperty: "speakers")
    } 
}

是否可以在查询中使用链接对象?

1 个答案:

答案 0 :(得分:2)

不支持对计算属性的查询。目前,没有办法根据对象的传入链接进行查询; work on adding that is in progress