| Bug #54698 | Join or Let LINQ command with Anonymous Initializer fails | ||
|---|---|---|---|
| Submitted: | 22 Jun 2010 15:35 | Modified: | 23 Jun 2010 12:10 |
| Reporter: | M B | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S2 (Serious) |
| Version: | 6.3.2 | OS: | Windows (7 (64bit)) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Anonymous Initializer, entities, join, Let, linq | ||
[23 Jun 2010 12:09]
M B
Problem resolved: not a bug with connector! My connection strings were pointing at incorrect database, doh! One good days programming down the drain!
[23 Jun 2010 12:10]
M B
Closed this mofo down

Description: Executing a LINQ statement with a Join or a Let command to output a List of my Domain Object 'Service' using an anonymous initializer throws this error: Unknown column 'Extent2.price' in 'field list' ------- By taking out the link to the 2nd EntitySet I receive no error. Using the Devart MySql Connector also eliminates any error. How to repeat: LINQ Join Query: Dim servs = From s In context.serviceSet _ Join sp In context.service_priceSet _ On s.serviceCode Equals sp.serviceCode _ Select New Service With {.ServicePrice = sp.price, _ .ServiceCode = s.code} servs.ToList() OR LINQ Let Query: Dim servs = From s In context.serviceSet _ Let prices = (From p In context.service_priceSet Select p).Where(Function(p) p.serviceCode = s.serviceCode) _ Select New Service With {.ServicePrice = prices.FirstOrDefault().price, _ .ServiceCode = s.code} servs.ToList()