Skip to content

Commit c8007e8

Browse files
author
g.yakimov
committed
add override of ToColumns for JoinedSubclassEntityPersister
1 parent e4c620e commit c8007e8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/NHibernate/Persister/Entity/BasicEntityPropertyMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public override IType Type
3131

3232
public override string[] ToColumns(ICriteria pathCriteria, string propertyName, Func<ICriteria, string> getSQLAlias)
3333
{
34-
var withClause = pathCriteria as Subcriteria != null ? ((Subcriteria)pathCriteria).WithClause as SimpleExpression : null;
34+
var withClause = pathCriteria as Subcriteria != null ? ((Subcriteria) pathCriteria).WithClause as SimpleExpression : null;
3535
if (withClause != null && withClause.PropertyName == propertyName)
3636
{
3737
return base.ToColumns(persister.GenerateTableAlias(getSQLAlias(pathCriteria), 0), propertyName);

src/NHibernate/Persister/Entity/JoinedSubclassEntityPersister.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,12 @@ public override string GenerateFilterConditionAlias(string rootAlias)
526526
return GenerateTableAlias(rootAlias, tableSpan - 1);
527527
}
528528

529+
public override string[] ToColumns(ICriteria pathCriteria, string propertyName, Func<ICriteria, string> getSQLAlias)
530+
{
531+
string alias = getSQLAlias(pathCriteria);
532+
return ToColumns(alias, propertyName);
533+
}
534+
529535
public override string[] ToColumns(string alias, string propertyName)
530536
{
531537
if (EntityClass.Equals(propertyName))

0 commit comments

Comments
 (0)