         // callbacks, which happen on the writing queue.
         database.write { db in
             let statement = try! self.source.selectStatement(db)
-            self.mainItems = Item<T>.fetchAll(statement)
+            self.mainItems = Item<Record>.fetchAll(statement)
             if !self.isObserving {
                 self.isSameRecord = self.isSameRecordBuilder(db)
                 self.diffItems = self.mainItems

    private var isObserving: Bool = false           // protected by mainQueue
    
    // The items exposed on public API
    private var mainItems: [Item<T>] = []           // protected by mainQueue
    
    // The record comparator. When T adopts MutablePersistable, we need to wait
    // for performFetch() in order to build it, because
    private var isSameRecord: ((T, T) -> Bool) = { _ in false }
    private let isSameRecordBuilder: (Database) -> (T, T) -> Bool
    
    
    /// The source
    private let source: DatabaseSource<T>
    
    /// The observed tables. Set in performFetch()
    private var observedTables: Set<String> = []    // protected by database queue

    /// The sections
    ///
    /// MUST BE CALLED ON mainQueue (TODO: say it nicely)
    public var sections: [FetchedRecordsSectionInfo<Record>] {
        // We only support a single section
        return [FetchedRecordsSectionInfo(controller: self)]
    }
