Skip to content

Treat transparentcast as guessed type in hql #3259

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 9 commits into from
Mar 22, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Generate async files
  • Loading branch information
github-actions[bot] committed Mar 20, 2023
commit 3367c4eec1f149196594a920c33d16c47ceda578
11 changes: 5 additions & 6 deletions src/NHibernate.Test/Async/Linq/EnumTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,12 @@ public async Task ConditionalNavigationPropertyAsync()
}
}

[Test]
public async Task CanQueryComplexExpressionOnTestEnumAsync()
[TestCase(null)]
[TestCase(TestEnum.Unspecified)]
public async Task CanQueryComplexExpressionOnTestEnumAsync(TestEnum? value)
{
//TODO: Fix issue on SQLite with type set to TestEnum.Unspecified
TestEnum? type = null;
TestEnum? type = value;
using (var session = OpenSession())
using (var trans = session.BeginTransaction())
{
var entities = session.Query<EnumEntity>();

Expand All @@ -197,7 +196,7 @@ public async Task CanQueryComplexExpressionOnTestEnumAsync()
coalesce = user.NullableEnum1 ?? TestEnum.Medium
}).ToListAsync());

Assert.That(query.Count, Is.EqualTo(0));
Assert.That(query.Count, Is.EqualTo(type == TestEnum.Unspecified ? 1 : 0));
}
}

Expand Down