Skip to content

Fix duplicate join for collection #2890

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

Merged
merged 4 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/NHibernate.Test/Async/NHSpecificTest/GH1962/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ namespace NHibernate.Test.NHSpecificTest.GH1962
public class FixtureAsync : BugTestCase
{
[Test]
[KnownBug("#1962")]
public async Task LinqShouldBeValidAsync()
{
using (var session = OpenSession())
using (session.BeginTransaction())
{
var result =
await (session
Expand Down
2 changes: 0 additions & 2 deletions src/NHibernate.Test/NHSpecificTest/GH1962/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ namespace NHibernate.Test.NHSpecificTest.GH1962
public class Fixture : BugTestCase
{
[Test]
[KnownBug("#1962")]
public void LinqShouldBeValid()
{
using (var session = OpenSession())
using (session.BeginTransaction())
{
var result =
session
Expand Down
1 change: 1 addition & 0 deletions src/NHibernate/Hql/Ast/ANTLR/Tree/FromElementFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ private FromElement CreateEntityAssociation(
_fromClause.Walker.AddQuerySpaces(_queryableCollection.CollectionSpaces);
}
elem.CollectionTableAlias = roleAlias;
_fromClause.AddCollectionJoinFromElementByPath(_path, elem);
return elem;
}

Expand Down