Page 1 of 1

OUTER APPLY is not supported by MySQL.

Posted: Fri 10 Feb 2012 01:54
by klaygomes
That is my first try using dotconnect and I'm using 'dotConnect for MySQL' version 6.7 trial, everything was working ok, but when I try to do something like:

Code: Select all

from tp in InstanceOfCleigomeModel.threads.OfType()
select new {
	topic= tp,
	topquestions = q.Questions.Take(5)
}
that is my diagram http://screencast.com/t/6xzSVhOR7Mjb

I get this error:
OUTER APPLY is not supported by MySQL.

what i'm doing wrong?

Posted: Fri 10 Feb 2012 17:25
by Shalex
MySQL Server doesn't support OUTER APPLY. You should reconstruct your query in the way when there is no OUTER APPLY in the SQL which is generated by EF runtime.

Posted: Mon 13 Feb 2012 01:37
by klaygomes
Shalex wrote:MySQL Server doesn't support OUTER APPLY. You should reconstruct your query in the way when there is no OUTER APPLY in the SQL which is generated by EF runtime.
I`m afraid I cant write this query in another way.

Posted: Tue 14 Feb 2012 16:37
by Shalex
When constructing your LINQ to Entities queries, please take into account the following typical scenarios that might lead to the presence of CROSS APPLY and/or OUTER APPLY operators in the output query:
- A correlated subquery with paging.
- An AnyElement over a correlated sub-query, or over a collection produced by navigation.
- LINQ queries that use grouping methods that accept an element selector.
- A query in which a CROSS APPLY or an OUTER APPLY is explicitly specified
- A query that has a DEREF construct over a REF construct.