diff --git a/GRDB/Foundation/NSDate.swift b/GRDB/Foundation/NSDate.swift index 84845ce8b..cdfc5d147 100644 --- a/GRDB/Foundation/NSDate.swift +++ b/GRDB/Foundation/NSDate.swift @@ -31,15 +31,10 @@ Usage: override var storedDatabaseDictionary: [String: DatabaseValueConvertible?] { return ["birthDate": birthDate, ...] } - + override func updateFromRow(row: Row) { - for (column, dbv) in row { - switch column { - case "birthDate": birthDate = dbv.value() - case ... - } - } - super.updateFromRow(row) // Subclasses are required to call super. + if let dbv = row["birthDate"] { birthDate = dbv.value() } + ... } }