     ///
     ///         This function should return true if the two records have the
     ///         same identity. For example, they have the same id.
-    public convenience init<T>(_ db: DatabaseWriter, request: FetchRequest<T>, queue: dispatch_queue_t = dispatch_get_main_queue(), isSameRecord: ((Record, Record) -> Bool)? = nil) {
+    public convenience init<T>(_ databaseWriter: DatabaseWriter, request: FetchRequest<T>, queue: dispatch_queue_t = dispatch_get_main_queue(), isSameRecord: ((Record, Record) -> Bool)? = nil) {
         // Retype the fetch request
         let request: FetchRequest<Record> = FetchRequest(query: request.query)
         let source = DatabaseSource.FetchRequest(request)
-        self.init(db: db, source: source, queue: queue, isSameRecord: isSameRecord)
-    }
-    
-    private convenience init(db: DatabaseWriter, source: DatabaseSource<Record>, queue: dispatch_queue_t, isSameRecord: ((Record, Record) -> Bool)?) {
+        self.init(databaseWriter: databaseWriter, source: source, queue: queue, isSameRecord: isSameRecord)
+    }
+    
+    private convenience init(databaseWriter: DatabaseWriter, source: DatabaseSource<Record>, queue: dispatch_queue_t, isSameRecord: ((Record, Record) -> Bool)?) {
         if let isSameRecord = isSameRecord {
-            self.init(db: db, source: source, queue: queue, isSameRecordBuilder: { _ in isSameRecord })
+            self.init(databaseWriter: databaseWriter, source: source, queue: queue, isSameRecordBuilder: { _ in isSameRecord })
         } else {
-            self.init(db: db, source: source, queue: queue, isSameRecordBuilder: { _ in { _ in false } })
-        }
-    }
-    
-    private init(db: DatabaseWriter, source: DatabaseSource<Record>, queue: dispatch_queue_t, isSameRecordBuilder: (Database) -> (Record, Record) -> Bool) {
+            self.init(databaseWriter: databaseWriter, source: source, queue: queue, isSameRecordBuilder: { _ in { _ in false } })
+        }
+    }
+    
+    private init(databaseWriter: DatabaseWriter, source: DatabaseSource<Record>, queue: dispatch_queue_t, isSameRecordBuilder: (Database) -> (Record, Record) -> Bool) {
         self.source = source
-        self.writer = db
+        self.databaseWriter = databaseWriter
         self.isSameRecord = { _ in return false }
         self.isSameRecordBuilder = isSameRecordBuilder
         self.queue = queue

    ///
    ///     - compareRecordsByPrimaryKey: A boolean that tells if two records
    ///         share the same identity if they share the same primay key.
    public convenience init<U>(_ db: DatabaseWriter, request: FetchRequest<U>, queue: dispatch_queue_t = dispatch_get_main_queue(), compareRecordsByPrimaryKey: Bool) {
        // Retype the fetch request
        let request: FetchRequest<Record> = FetchRequest(query: request.query)
        let source = DatabaseSource.FetchRequest(request)
        if compareRecordsByPrimaryKey {
            self.init(db: db, source: source, queue: queue, isSameRecordBuilder: { db in try! Record.primaryKeyComparator(db) })
        } else {
            self.init(db: db, source: source, queue: queue, isSameRecordBuilder: { _ in { _ in false } })
        }
    }
}

        }
    }
    
    /// The database writer used to fetch records.
    ///
    /// The controller registers as a transaction observer in order to respond
    /// to changes.
    public let databaseWriter: DatabaseWriter
    
    /// The dispatch queue on which the controller must be used.
    ///
