/** Creates a new "untitled" model object with no document or database at all yet.
Setting its .database property will cause it to create a CBLDocument.
(This method is mostly here so that NSController objects can create CBLModels.) */
- (instancetype) init;
MYModel setValue:ofProperty:], /Users/jenkins/jenkins/workspace/build_cblite_ios_100/couchbase-lite-ios/Source/API/CBLModel.m:447<unknown>:0: error: -[MYView viewDidLoad] : failed: caught "NSInternalInconsistencyException", "Invalid parameter not satisfying: _document"
public class MYView : UIView {
override func viewDidLoad() {
//Init manager/db
var manager : CBLManager = CBLManager.sharedInstance()
var database : manager.databaseNamed("mydb", error: nil)
//Create model
var model : MYModel = MYModel()
//!!!Exception!!!
model.name = "somename"
model.database = database
}
}
#import "CBLModel.h"
@interface MYModel : CBLModel
@property (copy) NSString* name;
@end
#import "MYModel.h"
@implementation MYModel : CBLModel
@dynamic name;
@end