Realm 0.95.3 から Realm 0.96.3 へのアップグレード
RLMObjectStore.mm:106 内でアプリケーション エラーが発生しました
プロパティがオプションになったことを示すエラーをスローします
(lldb) po objectSchema
DTFLogMessage {
id {
type = string;
objectClassName = (null);
indexed = YES;
isPrimary = YES;
optional = YES;
}
creationDate {
type = date;
objectClassName = (null);
indexed = NO;
isPrimary = NO;
optional = YES;
}
message {
type = string;
objectClassName = (null);
indexed = NO;
isPrimary = NO;
optional = YES;
}
fileinfo {
type = string;
objectClassName = (null);
indexed = NO;
isPrimary = NO;
optional = YES;
}
type {
type = int;
objectClassName = (null);
indexed = NO;
isPrimary = NO;
optional = NO;
}
}
これらを再びオプションでなくする方法はありますか?これを行う方法に関するドキュメントには何も表示されません。モデルは次のように構成されています。
#import <Realm/RLMObject.h>
@interface DTFLogMessage : RLMObject
@property NSString *id;
@property NSDate *creationDate;
@property NSString *message;
@property NSString *fileinfo;
@property NSInteger type;
@end
RLM_ARRAY_TYPE(DTFLogMessage)
.m ファイルは次のとおりです。
#import "DTFLogMessage.h"
@implementation DTFLogMessage
+ (NSString*)primaryKey
{
return @"id";
}
@end