-
Notifications
You must be signed in to change notification settings - Fork 934
Fix ConditionalProjection GetType from outer query #2455
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
About async generation, you may have maca88/AsyncGenerator#150 issue, see its discussion for a workaround. |
Thank you, @fredericDelaporte, that did allow the AsyncGenerator to run, and it did make a few additional things Async that I'd missed. You should really get that committed. I also made the test exclude MsSqlCe by SupportsScalarSubSelects of the dialect. Can you tell me if I need to fix the CodeFactor check's SA1402 violation? It seems like all test cases use the pattern of putting all entity classes in one file. |
Note for future. Looking at stack trace: AbstractEntityPersister.ToType(String propertyName) line 2065
CriteriaQueryTranslator.GetType(ICriteria subcriteria, String propertyName) line 810
PropertyProjection.GetTypes(ICriteria criteria, ICriteriaQuery criteriaQuery) line 50
ConditionalProjection.GetTypes(ICriteria criteria, ICriteriaQuery criteriaQuery) line 56
SimpleProjection.GetColumnCount(ICriteria criteria, ICriteriaQuery criteriaQuery) line 79
SimpleProjection.GetColumnAliases(Int32 position, ICriteria criteria, ICriteriaQuery criteriaQuery) line 41
ConditionalProjection.ToSqlString(ICriteria criteria, Int32 position, ICriteriaQuery criteriaQuery) line 50 All those calls to generate single alias |
It was much simpler before it was changed in 1775cc2, which references https://nhibernate.jira.com/browse/NH-3644. The same change also caused #1180. The change seems to be in the direction of supporting multiple aliases for composite columns, but then the code still just only takes the first element of the returned array. Maybe we can move back to the much simpler call |
Yeah I got where those changes come from. Only I think all places should be changed back where replacement was done to analogue of |
But discussion of future plans aside, I still think the change submitted here is a correct thing. So how I move it forward?
|
Yes. I agree. I didn't do it in first place (when
It's fine as is by me. But I guess better to fix it just to make everyone happy.
You can force push it if you want to make it look clean. But don't sweat on it (as long GitHub's Update Branch works without conflicts) |
This should fix #2454.
The AsyncGenerator was failing for me (I'll open another issue about that) from the build menu, so I wrote the async version of the test by hand.