mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
README.md
This commit is contained in:
1 parent
30f8d7218d
commit
2836fbd15f
1 file changed
+1
-5
@@ -717,11 +717,7 @@ You can for example **override primitive methods**:
|
||||
class Book : RowModel {
|
||||
...
|
||||
|
||||
override class var databasePrimaryKey: PrimaryKey {
|
||||
return .Column("uuid")
|
||||
}
|
||||
|
||||
// Before insertion, set uuid if not set yet.
|
||||
// Before insertion, set uuid primary key if not set yet.
|
||||
override func insert(db: Database) throws {
|
||||
if uuid == nil {
|
||||
uuid = NSUUID().UUIDString
|
||||
|
||||
Reference in new issue
Block a user