From d6e0dcafcbfcd8b8589f638a0ee67f5e649fe882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 25 May 2019 08:35:25 +0200 Subject: [PATCH] Fix two README typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5522f00d..46d7672c6 100644 --- a/README.md +++ b/README.md @@ -2213,7 +2213,7 @@ if let player = try Player.fetchOne(db, key: 1) It is possible to [avoid useless updates](#record-comparison): ```swift -if let player = try Player.fetchOne(db, key: 1) { +if var player = try Player.fetchOne(db, key: 1) { // does not hit the database if score has not changed try player.updateChanges(db) { $0.score = 1000 @@ -3060,7 +3060,7 @@ if newPlayer.databaseEquals(oldPlayer) == false { } ``` -> :point_up: **Note**: The comparison is performed on the database representation of records. As long as your record type adopts a PersistableRecord protocol, you don't need to care about Equatable. +> :point_up: **Note**: The comparison is performed on the database representation of records. As long as your record type adopts the EncodableRecord protocol, you don't need to care about Equatable. ### The `databaseChanges` and `hasDatabaseChanges` Methods