     ///   relations does not need any row adapter.
     func rowAdapter(
         _ context: SQLGenerationContext,
-        fromIndex startIndex: Int) throws
+        fromIndex startIndex: Int,
+        rootRelation: Bool) throws
     -> (adapter: RowAdapter, endIndex: Int)?
     {
         // Root relation && no join => no need for any adapter
-        if startIndex == 0 && joins.isEmpty {
+        if rootRelation && joins.isEmpty {
             return nil
         }
         

    ///         let author: Author = row["author"]
    ///     }
    private func rowAdapter(_ context: SQLGenerationContext) throws -> RowAdapter? {
        try relation.rowAdapter(context, fromIndex: 0)?.adapter
    }
}


        var endIndex = startIndex + sourceSelectionWidth
        var scopes: [String: RowAdapter] = [:]
        for (key, join) in joins {
            if let (joinAdapter, joinEndIndex) = try join
                .relation
                .rowAdapter(context, fromIndex: endIndex, rootRelation: false)
            {
                scopes[key] = joinAdapter
                endIndex = joinEndIndex
            }
        }
        
        // (Root relation || empty selection) && no included relation => no need for any adapter
        if (rootRelation || sourceSelectionWidth == 0) && scopes.isEmpty {
            return nil
        }
        
