I am trying to create a CBLModel subclass with a custom documentID consisting of some attributes of my model.
I am overriding the idForNewDocument method, but how can I use attributes in this function if it it´s called in the factory inits?
`
class MyModel: CBLModel {
class func with(a: String, b: String, n: String) -> MyModel {
let model = MyModel(forNewDocumentIn: CB.shared.database)
return model
}
override func idForNewDocument(in db: CBLDatabase) -> String {
return "\(self.a)_\(self.b)_\(self.n)"
}
}
`