Upgrading from Realm 0.95.3 to Realm 0.96.3
Application errors out inside RLMObjectStore.mm:106
Throws error stating the properties have been made optional
(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;
}
}
How can these be made non optional again i do not see anything in the documentation on how to do this. Model is configured as below:
#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 file is as follows.
#import "DTFLogMessage.h"
@implementation DTFLogMessage
+ (NSString*)primaryKey
{
return @"id";
}
@end