README.md

This commit is contained in:
Gwendal Roué committed 2015-09-05 17:32:22 +02:00
1 parent 6ed8d61380
commit ba09afe371
1 file changed
+2 -2
+2 -2
View File
@@ -1099,7 +1099,7 @@ try dbQueue.inTransaction { db in
}
```
Models that declare a `RowID` primary key have their id automatically set after successful insertion.
Models whose primary key is declared as "INTEGER PRIMARY KEY" have their id automatically set after successful insertion.
Other primary keys (single or multiple columns) are not managed by GRDB: you have to manage them yourself. You can for example override the `insert` primitive method, and make sure your primary key is set before calling `super.insert`.
@@ -1148,7 +1148,7 @@ RowModel methods can throw [DatabaseError](#error-handling) and also specific er
#### Autoincrement
**For "autoincremented" ids**, declare your id column as INTEGER PRIMARY KEY, and declare a RowID primary key:
**For "autoincremented" ids**, declare your id column as INTEGER PRIMARY KEY:
```sql
CREATE TABLE persons {