Invalid Sql with RowNumberPaging when projecting multiple owned entities #12880
Labels
closed-out-of-scope
This is not something that will be fixed/implemented and the issue is closed.
customer-reported
punted-for-3.0
type-bug
Query to model with single owned type or query for select only one owned type working correct, but when you make query to model with multiply owned types, generated sql query has invalid indexes.
Steps to reproduce
We have a model like
which contais 3 owned types
We get top 20 programs from context
We go to the Sql Server Prifiler and can see this request, generated by ef core:
ok, it's correct.
Now let's add more owed type into select expression.
Sql request in profiler
The
[p].[Id],
repeat multiply times. In simply request it's not make some exceptions but if we use Sql Server 2008R2, we can have many troubles.Make select operation with offset
Sql request in profiler
And as result we have Exception
--
Further technical details
EF Core version: 2.1.1
Database Provider: MS SQL SERVER
Operating system: WINDOWS SERVER 2012R2
IDE: (e.g. Visual Studio 2017 15.4)
The text was updated successfully, but these errors were encountered: