-
Notifications
You must be signed in to change notification settings - Fork 935
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
Wrong alias in Where clause if using Fetch and scalar Select #3263
Comments
Might be regression from #2496 |
But why Fetch is present in query if you Select some scalar values? While it's a valid issue your Fetch makes no sense in this query. |
Yes, the Fetch makes no sense in this case. The project, in which I noticed this bug, is more complex than the example above and has included Fetch already. Unfortunately I can’t remove it there. |
Fixed by #3267 |
Thank you! |
I have two entities (Employee and OptionaInfo) which are linked over HasOne mappings. When running this query:
I get this error:
NHibernate uses alias
optionalin2_
but doesn’t define it. If I changeoptionalin2_
tooptionalin1_
manually, the query works.The error only occurs if the Fetch method is present. Without Fetch everything works as expected.
I tested NHibernate versions 5.4.1, 5.4.0 and 5.3.15. The error appears in 5.4.1 and 5.4.0. Version 5.3.15 works just fine. I'm using PostgreSQL.
Here are my entities and maps:
The text was updated successfully, but these errors were encountered: