Skip to content

EFCore generates query with OUTER APPLY instead of LEFT OUTER JOIN #1165

Description

@MatejSpin

Using: NET 8, Entity Framework Core 10.0.0 , Microsoft.EntityFrameworkCore 7.0.17
Server: Firebird 3.

We are migrating our NET 4.8 solution to NET 8. Updated EF providers to EF Core.
A lot of queries are now coming up with following exception:

"Dynamic SQL Error\r\nSQL error code = -104\r\nToken unknown - line 3, column 1\r\nOUTER"

It's a pretty basic query:

var items= dbContext.Items.Where(x => relatedItemIds.Contains(x.RelatedItemId).Select(c => new { c.Id, c.State, c.ModifiedBy c.ModifiedDate, SubItems = c.SubItems.Select(y => new SubItemData() { y.ID, y.State, y.ModifiedBy, y.ModifiedDate, }) }).ToList();

This generates a working query with LEFT OUTER JOIN on .NET provider, but uses OUTER APPLY on the new NET Core provider - which Firebird does not support.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions