README.md

This commit is contained in:
Gwendal Roué committed 2015-11-03 19:20:40 +01:00
1 parent 7cd383ab85
commit e493b724b4
1 file changed
+1 -3
+1 -3
View File
@@ -1513,7 +1513,7 @@ Even multi-column primary keys:
// ON UPDATE CASCADE ON DELETE CASCADE,
// PRIMARY KEY (personId, countryIsoCode)
// )
class Citizenships : Record {
class Citizenship : Record {
var countryIsoCode: String?
var personId: Int64?
@@ -1533,8 +1533,6 @@ class Citizenships : Record {
}
```
Yes, the Record boilerplate is not very [DRY](http://c2.com/cgi/wiki?DontRepeatYourself), and there is no fancy mapping operators. Fancy operators make trivial things look magic, and non-trivial things look ugly. Record boilerplate is not magic, and not ugly: it's just as complex as you want it to be.
The `updateFromRow` method updates properties from the columns found in the row. See [Rows as Dictionaries](#rows-as-dictionaries) for more information about the `DatabaseValue` type of the `dbv` variable, and [Values](#values) about the supported property types.
> :point_up: **Note**: The `updateFromRow` method MUST NOT assume the presence of particular columns. The Record class itself reserves the right to call `updateFromRow` with arbitrary columns. The following implementation is thus discouraged: