Bug #58445 Column 'Col1' in order clause is ambiguous
Submitted: 24 Nov 2010 7:32 Modified: 25 Dec 2010 13:13
Reporter: Whikiey Yan Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:v6.3.4 OS:Any
Assigned to: CPU Architecture:Any

[24 Nov 2010 7:32] Whikiey Yan
Description:
When i use an column from a related table by "IQueryable.OrderBy" or "IQueryable.OrderByDescending", it cause an exception:
"Column 'Col1' in order clause is ambiguous"

relation is :
1 : 0...1

In generated SQL, there is no table alias suffix of the order column.

How to repeat:
always

Suggested fix:
in generated SQL, add the table alias suffix to the order column.
[25 Nov 2010 9:07] Whikiey Yan
in Linq to Entities
[25 Nov 2010 9:19] Tonci Grgin
I am sorry Whikiey but this still is not a bug report. We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.

Explanation: A small but complete test case, along with DML/DDL, connection string, MySQL server version, full OS and .NET FW info should be attached before thinking of processing this.
[25 Nov 2010 13:03] Whikiey Yan
I'm not asking for help, and i'm sure it is a bug, may be i expressed not clearly enough, but please don't close it.

expression like this will cause an error above.

items.OrderBy(item => item.ChildTables.Col1);
[25 Nov 2010 13:13] Tonci Grgin
Whikiey, I will not close anything, this is a public bugsdb. But, I will not work on the problems with no attached test case nor enough info to proceed cause:
  a) this would be unfair to me and the others with test cases attached
  b) will probably lead to closing if I do things other than the way you did them

If you do not understand this then I'm sorry. You should have thought of reproducible test case *before* posting to BugsDB because no info and no test case *is* a free support request by definition.
[26 Dec 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".