                 ]),
                 ParentInfo(
                     parent: Parent(id: 1, name: "foo"),
+                    children: [
+                        Child(id: 1, parentId: 1, name: "fooA2"),
+                        Child(id: 2, parentId: 1, name: "fooB"),
+                ]),
+                ParentInfo(
+                    parent: Parent(id: 1, name: "foo"),
+                    children: [
+                        Child(id: 1, parentId: 1, name: "fooA2"),
+                        Child(id: 2, parentId: 1, name: "fooB"),
+                ]),
+                ParentInfo(
+                    parent: Parent(id: 2, name: "bar"),
                     children: []),
             ],
             setup: setup,
-            recordedUpdates: { db in
-                try db.execute(sql: "DELETE FROM child")
-            })
+            recordedUpdates: performDatabaseModifications)
         
         // The fundamental technique for removing duplicates of non-Equatable types
         try assertValueObservation(

        let observation = ValueObservation.tracking(request.fetchAll)
        
        let recorder = observation.record(in: dbQueue)
        try dbQueue.inDatabase { db in
            try db.execute(sql: "DELETE FROM child")
        }
        let results = try wait(for: recorder.next(2), timeout: 1)
        
        XCTAssertEqual(results[0].count, 2)
        XCTAssertEqual(results[0][0].unscoped, ["id": 1, "name": "foo"])
        XCTAssertEqual(results[0][0].prefetchedRows["children"], [
            ["id": 1, "parentId": 1, "name": "fooA", "grdb_parentId": 1],
            ["id": 2, "parentId": 1, "name": "fooB", "grdb_parentId": 1]])
        XCTAssertEqual(results[0][1].unscoped, ["id": 2, "name": "bar"])
        XCTAssertEqual(results[0][1].prefetchedRows["children"], [
            ["id": 3, "parentId": 2, "name": "barA", "grdb_parentId": 2]])
        
        XCTAssertEqual(results[1].count, 2)
        XCTAssertEqual(results[1][0].unscoped, ["id": 1, "name": "foo"])
        XCTAssertEqual(results[1][0].prefetchedRows["children"], [])
        XCTAssertEqual(results[1][1].unscoped, ["id": 2, "name": "bar"])
        XCTAssertEqual(results[1][1].prefetchedRows["children"], [])
    }

    func testOneRecordWithPrefetchedRows() throws {
        let request = Parent
            .including(all: Parent.children.orderByPrimaryKey())

                .removeDuplicates()
                .map { row in row.map(ParentInfo.init(row:)) },
            records: [
                nil,
                ParentInfo(
                    parent: Parent(id: 1, name: "foo"),
                    children: []),
                ParentInfo(
                    parent: Parent(id: 1, name: "foo"),
                    children: [
