Skip to content

Commit

Permalink
Use path when no index provider exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mdameer committed Jul 4, 2024
1 parent 795a536 commit 66bc893
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public string GetColumnName(string propertyPath)
// no property provider exists; hope sql is case-insensitive (will break postgres; property providers must be supplied for postgres)
// Switch the given alias in the path with the mapped alias.
// aliasPart.Alias -> AliasPartIndex.alias
return $"{Dialect.QuoteForAliasName(tableAlias)}.{Dialect.QuoteForColumnName(values[0])}";
return $"{Dialect.QuoteForAliasName(tableAlias)}.{Dialect.QuoteForColumnName(values.Last())}";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void ShouldReturnQuotedTableAliasAndPathWhenProviderNotExists()
var columnName = predicateQuery.GetColumnName("ListItemIndexPath.Value");

// Assert
Assert.Equal("[ListItemIndexAlias].[ListItemIndexPath]", columnName);
Assert.Equal("[ListItemIndexAlias].[Value]", columnName);
}

public class ListItemIndex : MapIndex
Expand Down

0 comments on commit 66bc893

Please sign in to comment.