Skip to content

Commit 3c81758

Browse files
committed
AbstractCollectionPersister: Include the table when generating column aliases.
This modifies the calls to Column.GetAlias() in two places to also include the table parameter, so that the generated alias will be unique in more cases. It matches what is currently used in Hibernate code. This fixes the failure of SubselectFetchFixture.ManyToManyCriteriaJoin on SqlServerCe that was introduced by the modifications to Column.GetAlias() done in 013b5da.
1 parent ae6d299 commit 3c81758

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public AbstractCollectionPersister(Mapping.Collection collection, ICacheConcurre
239239
foreach (Column col in collection.Key.ColumnIterator)
240240
{
241241
keyColumnNames[k] = col.GetQuotedName(dialect);
242-
keyColumnAliases[k] = col.GetAlias(dialect);
242+
keyColumnAliases[k] = col.GetAlias(dialect, table);
243243
k++;
244244
}
245245
joinColumnNames = keyColumnNames;
@@ -306,7 +306,7 @@ public AbstractCollectionPersister(Mapping.Collection collection, ICacheConcurre
306306
int j = 0;
307307
foreach (ISelectable selectable in element.ColumnIterator)
308308
{
309-
elementColumnAliases[j] = selectable.GetAlias(dialect);
309+
elementColumnAliases[j] = selectable.GetAlias(dialect, table);
310310
if (selectable.IsFormula)
311311
{
312312
Formula form = (Formula) selectable;

0 commit comments

Comments
 (0)