为什么此查询会抛出该演示文稿不属于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")
}
}
是否可以在查询中使用链接对象?