Skip to content
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

join on multiple conditions #2330

Closed
georgi-yakimov opened this issue Mar 18, 2020 · 2 comments · May be fixed by #2331
Closed

join on multiple conditions #2330

georgi-yakimov opened this issue Mar 18, 2020 · 2 comments · May be fixed by #2331

Comments

@georgi-yakimov
Copy link

georgi-yakimov commented Mar 18, 2020

hi,

I've run into the following problem when trying to do a join on multiple columns:

select Id, col, fk_t2
from dbo.table1 t1
left outer join dbo.table2 t2 on t1.fk_t2 = t2.Id and t2.col = t1.col
where <filtering>

but the output is:

select Id, col, fk_t2
from dbo.table1 t1
left outer join dbo.table2 t2 on t1.fk_t2 = t2.Id and t2.col = t1_1.col
where <filtering>

The problem is that when there's inheritance join with a withClause and the column which is used in the withClause is present in the base and the inherited table the condition is not generated correctly. The table that is considered in the with clause is from the base table which is not yet joined.

I've checked the code and I think I've found a solution. Can you give me privileges to create a topic branch?

@gliljas
Copy link
Member

gliljas commented Mar 18, 2020

You should fork and create a PR.
https://github.com/nhibernate/nhibernate-core/blob/master/CONTRIBUTING.md

@fredericDelaporte
Copy link
Member

Fixed by #2361 and #2545.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants