You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimal example based on the Northwind tests. This leads to the association between the tables being lost and so the resultant SQL lacks the where exists clause.
var res = someProvider.GetTable<Customer>().Select(c => new { c.CustomerID, c.Orders });
var qp = someProvider.GetQueryPlan(res.Expression);
Console.WriteLine(qp.QueryText);
[Table(Name = "Customers")]
public class Customer
{
//[Column(Name = "CustomerID")] ok
[Column(Name = "CustomerID1")]
public string CustomerID;
[Association(KeyColumns = nameof(CustomerID))]
public List<Order> Orders;// = new List<Order>();
}
[Table(Name = "Orders")]
public class Order
{
//[Column(Name = "CustomerID")] ok
[Column(Name = "CustomerID1")]
public string CustomerID;
}
Result:
SELECT t0."CustomerID1"
FROM "Customers" AS t0
SELECT t0."CustomerID1"
FROM "Orders" AS t0
The text was updated successfully, but these errors were encountered:
jmkinzer
changed the title
database column name differing member names from leads to incorrect query
database column name differing from member name leads to incorrect query
Sep 9, 2024
Please note this applies to the modern branch.
Minimal example based on the Northwind tests. This leads to the association between the tables being lost and so the resultant SQL lacks the where exists clause.
Result:
The text was updated successfully, but these errors were encountered: