Skip to content

Commit

Permalink
Up date to latest ef core dependency (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJollyAU committed Jun 22, 2024
1 parent 4a11689 commit 2d5930a
Show file tree
Hide file tree
Showing 3 changed files with 448 additions and 20 deletions.
10 changes: 5 additions & 5 deletions Dependencies.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<EFCoreVersion>[8.0.3,8.0.999]</EFCoreVersion>
<EFCoreVersion>[8.0.6,8.0.999]</EFCoreVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -10,7 +10,7 @@
<PackageReference Update="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Update="Microsoft.EntityFrameworkCore" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="$(EFCoreVersion)" />
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
<PackageReference Update="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />

Expand All @@ -28,9 +28,9 @@
<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational.Specification.Tests" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Update="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Update="MSTest.TestAdapter" Version="3.4.3" />
<PackageReference Update="MSTest.TestFramework" Version="3.4.3" />
<PackageReference Update="coverlet.collector" Version="6.0.2" />
<PackageReference Update="Newtonsoft.Json" Version="13.0.3" />

Expand Down
19 changes: 4 additions & 15 deletions src/EFCore.Jet/Query/Internal/JetLiftOrderByPostprocessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ public virtual Expression Process(Expression expression)
selectExpression.PushdownIntoSubquery();
}

for (int j = 0; j < columnsToRewrite.Count; j++)
foreach (var colr in columnsToRewrite)
{
(int? index, OrderingExpression? oexp, bool ascending, bool rewrite, bool referstocurouter) = columnsToRewrite[j];
(int? index, OrderingExpression? oexp, bool ascending, bool rewrite, bool referstocurouter) = colr.Value;
if (index.HasValue)
{
var proj = selectExpression.Projection[index.Value];
Expand All @@ -145,20 +145,9 @@ public virtual Expression Process(Expression expression)
}
}

if (isscalarselect)
if (isscalarselect && selectExpression.Projection.Count > 1)
{
List<ProjectionExpression> newProjections = new List<ProjectionExpression>();
for (int j = 0; j < selectExpression.Projection.Count; j++)
{
var proj = selectExpression.Projection[j];
var item = columnsToRewrite.SingleOrDefault(c => c.Value.indexcol == j);
if (item.Value.indexcol == null)
{
newProjections.Add(proj);
}

}

List<ProjectionExpression> newProjections = [selectExpression.Projection[0]];
selectExpression = selectExpression.Update(newProjections, selectExpression.Tables, selectExpression.Predicate,
selectExpression.GroupBy, selectExpression.Having, selectExpression.Orderings,
selectExpression.Limit, selectExpression.Offset);
Expand Down
Loading

0 comments on commit 2d5930a

Please sign in to comment.