 }
 
 extension Association {
-    private func mapRelation(_ transform: (SQLRelation) -> SQLRelation) -> Self {
-        return Self.init(sqlAssociation: sqlAssociation.mapRelation(transform))
+    private func mapDestinationRelation(_ transform: (SQLRelation) -> SQLRelation) -> Self {
+        return Self.init(sqlAssociation: sqlAssociation.mapDestinationRelation(transform))
     }
 }
 

    ///         .order{ _ in [Column("name")] }
    ///     var request = Player.including(required: association)
    public func order(_ orderings: @escaping (Database) throws -> [SQLOrderingTerm]) -> Self {
        return mapRelation { $0.order(orderings) }
    }
    
    /// Creates an association that reverses applied orderings.

    /// associated record are not selected. The returned relation does not
    /// require that the associated database table contains a matching row.
    func joining(optional sqlAssociation: SQLAssociation) -> SQLRelation {
        return sqlAssociation.mapDestinationRelation { $0.select([]) }.extendedRelation(self, kind: .oneOptional)
    }
    
    /// Creates an relation that joins another one. The columns of the
    /// associated record are not selected. The returned relation requires
    /// that the associated database table contains a matching row.
    func joining(required sqlAssociation: SQLAssociation) -> SQLRelation {
        return sqlAssociation.mapDestinationRelation { $0.select([]) }.extendedRelation(self, kind: .oneRequired)
    }
}

extension Association {
    /// Creates an association that prefetches another one.
    public func including<A: AssociationToMany>(all association: A) -> Self where A.OriginRowDecoder == RowDecoder {
        return mapDestinationRelation {
            $0.including(all: association.sqlAssociation)
        }
    }
