Oyvindkg / swiftydb

💀Neither supported nor maintained for years. A type-safe, protocol-based, pure Swift database offering effortless persistence of any object

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

update not work

huanghe810229530 opened this issue · comments

class func primaryKeys() -> Set<String> {
    return ["id"]
}

static func save(array: [DisModel]) {
    let database = SwiftyDB(databaseName: "dogtopia")
//        database.deleteObjectsForType(DisModel.self)
    database.addObjects(array, update: true)
 }

8ba1f7b9-2de9-4b1a-9192-4fc2e749f5ae

As above, even if I put the update parameter is true, add object database is to be repeated.

it's my wrong.