         if alias.hasUserName {
             return alias.identityName
         }
-        if qualifierNeeded == false {
+        if qualifiesColumnsWithTable == false {
             return nil
         }
         return resolvedName(for: alias)

            db: db,
            argumentsSink: argumentsSink,
            resolvedNames: [:],
            qualifierNeeded: false)
    }
    
    /// Used for TableRecord.selectionSQL
    static func selectionContext(
        _ db: Database,
        argumentsSink: StatementArgumentsSink = StatementArgumentsSink())
        -> SQLGenerationContext
    {
        SQLGenerationContext(
            db: db,
            argumentsSink: argumentsSink,
            resolvedNames: [:],
            qualifierNeeded: true)
    }
    
    /// Used for SQLQueryGenerator

            db: db,
            argumentsSink: argumentsSink,
            resolvedNames: aliases.resolvedNames,
            qualifiesColumnsWithTable: aliases.count > 1)
    }
    
    /// Returns whether arguments could be appended.
