README.md

This commit is contained in:
Gwendal Roué committed 2015-09-09 08:59:19 +02:00
1 parent b2f537a876
commit 83f9a98bf5
1 file changed
+6
+6
View File
@@ -1159,6 +1159,12 @@ CREATE TABLE persons (
```swift
class Person : RowModel {
var creationDate: NSDate?
override var storedDatabaseDictionary: [String: DatabaseValueConvertible?] {
return ["creationDate": creationDate, ...]
}
override func insert(db: Database) throws {
if creationDate == nil {
creationDate = NSDate()