New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query error in Firebird [DNET427] #425
Comments
Modified by: Damasio (andersondamasio)priority: Major [ 3 ] => Critical [ 2 ] Component: Entity Framework support [ 10110 ] Component: http://ADO.NET Provider [ 10041 ] => |
Commented by: @cincuranet Without the model I can hardly do anything about it. |
Modified by: @cincuranetstatus: Open [ 1 ] => In Progress [ 3 ] |
Modified by: @cincuranetpriority: Critical [ 2 ] => Major [ 3 ] |
Commented by: Damasio (andersondamasio) okay. I will build a model to give you. |
Commented by: Damasio (andersondamasio) Attached is the data. The error occurs in the code example below: public IQueryable SelectAllPED()
Result: ///////////////////////SQL generated//////////////////////// ///// Test also with Firebird 2.7.7 I hope to be helping thank you very much |
Modified by: Damasio (andersondamasio)Attachment: METADATA.SQL [ 12160 ] Attachment: WebApplication1.zip [ 12161 ] |
Commented by: @cincuranet OUTER APPLY (as well as CROSS APPLY) isn't supported by Firebird. And it's not easy to rewrite the query *in general* using JOINs esp. if you're inside code translating the query into SQL. More reading i.e. http://blogs.devart.com/dotconnect/entity-framework-user-request-review.html#fourth or http://explainextended.com/2009/07/16/inner-join-vs-cross-apply/ . |
Commented by: @cincuranet The bottom line is, that you have to rewrite your query. |
Commented by: Damasio (andersondamasio) I tried several other ways to achieve the same result, but always with an error. Only if you had not (OrderByDescending (o => o.PEDPOS_ID)), but I need it. unfortunately I'm in trouble. You any alternative to a linq command that does not generate the error? |
Commented by: @cincuranet This is not a support forum. Sorry. Please ask somewhere else. |
Commented by: Damasio (andersondamasio) Okay I'm sorry. But the error in question generated by the "entity" would not be a bug in the case? |
Commented by: Nick Coad (nickcoad) Can you explain why this is marked as "Won't Fix"? The Firebird provider is generating SQL that is not supported by Firebird, surely that is a bug that warrants looking at? Disappointed to see this still unfixed after 4 years. |
Commented by: @cincuranet I did: DNET427?focusedCommentId=25346&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_25346 |
Commented by: Nick Coad (nickcoad) Jiri, your provider is generating invalid Firebird SQL, that's the real issue. We all understand that OUTER APPLY is not supported by Firebird, and the bug we're reporting is that your provider is generating a query that contains OUTER APPLY, despite this being unsupported on Firebird. |
Modified by: @cincuranet |
Commented by: @cincuranet |
Submitted by: Damasio (andersondamasio)
Block progress on DNET711
Attachments:
METADATA.SQL
WebApplication1.zip
"Dynamic SQL Error
SQL error code = -104
Token unknown - line 8, column 3
OUTER"
protected void LinqDataSourcePedidos_QueryCreated(object sender, QueryCreatedEventArgs e)
{
var q = e.Query.Cast<PED>();
var result = (from t in q
select new
{
PEDPOS_POSICAO = (from pedpos in t.PEDPOS
where
t.PED_ID == pedpos.PED_ID &&
pedpos.PEDPOS_ID ==
t.PEDPOS.FirstOrDefault().PEDPOS_ID
select new
{
pedpos.PEDPOS_POSICAO
}).FirstOrDefault().PEDPOS_POSICAO,
PED_ID = t.PED_ID
});
e.Query = result;
}
The text was updated successfully, but these errors were encountered: