1
我正嘗試在Realm中使用計算屬性並將其用作primaryKey。Realm是否支持Swift中的計算屬性
dynamic var eventPrimaryKey: String{
get{
return "\(ID)\(eventId)"
}
}
但我收到此錯誤:
*** Terminating app due to uncaught exception 'RLMException', reason: 'Primary key property 'eventPrimaryKey' does not exist on object
您是否嘗試將'eventPrimaryKey'重命名爲其他內容? –