-
Notifications
You must be signed in to change notification settings - Fork 934
Support for criteria aliases in SqlProjection and SQLCriterion #2383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d923119
to
73f0c6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed both again, and I think this one is better.
Yes, this is supported. For the actual SQL it will generate unique aliases. |
internal IDictionary<string, string> GetCriteriaSQLAliasMap() | ||
{ | ||
var result = outerQueryTranslator != null | ||
? new Dictionary<string, string>(outerQueryTranslator.GetCriteriaSQLAliasMap()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a new dictionary because outerQueryTranslator.GetCriteriaSQLAliasMap()
could be an EmptyDictionary
which is read-only.
Encapsulate logic of rendering SQL aliases into CriteriaQueryTranslator
Fixes #896
This is an alternative approach to #2358. Here we replace all registered aliases without need of explicitly registering them.