From 78c9577b6b9ea080a4f96dd55b211592b481ef4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 5 Sep 2015 19:26:08 +0200 Subject: [PATCH] README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a5a10bd8a..5d3dfa2ae 100644 --- a/README.md +++ b/README.md @@ -949,7 +949,7 @@ We think that this is the killer feature of GRDB.swift :bowtie:. For example: class PersonsViewController: UITableViewController { // Private subclass of Person, with an extra `bookCount` property: - private class PersonViewModel : Person { + private class PersonWithBookCount : Person { var bookCount: Int! override func updateFromRow(row: Row) { @@ -960,13 +960,13 @@ class PersonsViewController: UITableViewController { } } - var persons: [PersonViewModel]! + var persons: [PersonWithBookCount]! override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) persons = dbQueue.inDatabase { db in - PersonViewModel.fetchAll(db, + PersonWithBookCount.fetchAll(db, "SELECT persons.*, COUNT(*) AS bookCount " + "FROM persons " + "JOIN books ON books.ownerID = persons.id " +