LINQ statement generates non-working SQL statement

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
i.kopcanski
Posts: 7
Joined: Mon 09 Nov 2009 17:36

LINQ statement generates non-working SQL statement

Post by i.kopcanski » Fri 27 Aug 2010 08:52

Hello,
I use Entity Framework 3.5 with .dotConnect for Oracle 5.70.152.0.
The LINQ statement on Oracle EF model keeps with retrieving Oracle
error in executing generated PL SQL statement:

"ORA-00904: \"Project1\".\"C3\": invalid identifier"}
System.Exception {Devart.Data.Oracle.OracleException}

The part of LINQ statement which causes this exception is:

from gCol in gridColumnsRep.GetQuery(true)
where (gCol.v2_templates_grid_columns.v2_columns.freefields_settings == null
||
gCol.v2_templates_grid_columns.v2_columns.freefields_settings.administrations_ff_settings.Any(
ffAdmin => ffAdmin.administration_id == currentProfile.AdministrationId))
&& gCol.v2_grid_def.id == gridRequest.GridDefID
orderby gCol.display_order
select ...

Can you help us with this?

Shalex
Devart Team
Posts: 8083
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 30 Aug 2010 11:12

I can reproduce this error only in the case when the name of the property in the SSDL part of the model is not the same as the name of the corresponding column (be aware, the letters of the name in SSDL should be in the same case as the case of the letters in column names in database).

If this doesn't help, please send us a test project with your model and DDL.

Post Reply