CloneSet397


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22230.990statement_list[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
122166
src/NHibernate/Loader/Custom/Sql/SQLQueryParser.cs
222207
src/NHibernate/Loader/Custom/Sql/SQLQueryParser.cs
Clone Instance
1
Line Count
22
Source Line
166
Source File
src/NHibernate/Loader/Custom/Sql/SQLQueryParser.cs

                        string[] columnAliases;

                        // Let return-propertys override whatever the persister has for aliases.
                        if ( !fieldResults.TryGetValue(propertyName, out columnAliases))
                        {
                                columnAliases = collectionPersister.GetCollectionPropertyColumnAliases(propertyName, collectionSuffix);
                        }

                        if (columnAliases == null || columnAliases.Length == 0)
                        {
                                throw new QueryException("No column name found for property [" + propertyName + "] for alias [" + aliasName + "]",
                                                         originalQueryString);
                        }
                        if (columnAliases.Length != 1)
                        {
                                // TODO: better error message since we actually support composites if names are explicitly listed.
                                throw new QueryException(
                                        "SQL queries only support properties mapped to a single column - property [" + propertyName + "] is mapped to " +
                                          columnAliases.Length + " columns.", originalQueryString);
                        }
                        aliasesFound++;
                        return columnAliases[0];


Clone Instance
2
Line Count
22
Source Line
207
Source File
src/NHibernate/Loader/Custom/Sql/SQLQueryParser.cs

                                string[] columnAliases;

                                // Let return-propertys override whatever the persister has for aliases.
                                if ( !fieldResults.TryGetValue(propertyName, out columnAliases))
                                {
                                        columnAliases = persister.GetSubclassPropertyColumnAliases(propertyName, suffix);
                                }

                                if (columnAliases == null || columnAliases.Length == 0)
                                {
                                        throw new QueryException("No column name found for property [" + propertyName + "] for alias [" + aliasName + "]",
                                                                 originalQueryString);
                                }
                                if (columnAliases.Length != 1)
                                {
                                        // TODO: better error message since we actually support composites if names are explicitly listed.
                                        throw new QueryException(
                                                "SQL queries only support properties mapped to a single column - property [" + propertyName + "] is mapped to " +
                                                  columnAliases.Length + " columns.", originalQueryString);
                                }
                                aliasesFound++;
                                return columnAliases[0];


Clone AbstractionParameter Count: 3Parameter Bindings

string[] columnAliases;
// Let return-propertys override whatever the persister has for aliases.
if ( !fieldResults.TryGetValue(propertyName, out columnAliases))
{
   columnAliases = [[#variable2d0a5660]]. [[#variable70e44460]](propertyName, [[#variable70e487e0]]);
}
if (columnAliases == null || columnAliases.Length == 0)
{
   throw new QueryException("No column name found for property [" + propertyName + "] for alias [" + aliasName + "]", originalQueryString);
}
if (columnAliases.Length != 1)
{
   // TODO: better error message since we actually support composites if names are explicitly listed.
   throw new QueryException("SQL queries only support properties mapped to a single column - property [" + propertyName + "] is mapped to " + columnAliases.Length + " columns.", originalQueryString);
}
aliasesFound++;
return columnAliases[0];
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#2d0a5660]]
collectionPersister 
12[[#2d0a5660]]
persister 
21[[#70e44460]]
GetCollectionPropertyColumnAliases 
22[[#70e44460]]
GetSubclassPropertyColumnAliases 
31[[#70e487e0]]
collectionSuffix 
32[[#70e487e0]]
suffix