EF6 OUTER APPLY is not supported by Oracle Database 11g and lower.

EF6 OUTER APPLY is not supported by Oracle Database 11g and lower.

Postby gavinluo » Mon 23 May 2016 06:55

i use code first , Oracle Server is 11g , Create Connection in code like this
Code: Select all
public mydbContext()
            : base(BuildDbConnection, true)
        {
        }
private static DbConnection BuildDbConnection
        {
            get
            {
new Devart.Data.Oracle.OracleConnection("conectionString");
}
}


my query like this
Code: Select all
var query = myRepository.GetQueryableByQuery(x => x.SHIPMENT_GID == shipmentGID || x.SHIPMENT_ID == shipmentGID)
                    .GroupBy(y => y.TRACKING_TYPE_SC + y.PROVINCE + y.CITY + y.ADDRESS)
                    .Select(tracking => tracking.OrderByDescending(t => t.TRACKING_DATE).FirstOrDefault());


OUTER APPLY is not supported by Oracle Database 11g and lower. Oracle 12c or higher is required to run this LINQ statement correctly. If you need to run this statement with Oracle Database 11g or lower, rewrite it so that it can be converted to SQL, supported by the version of Oracle you use. 在 Devart.Data.Oracle.Entity.a2.a(fc A_0)
在 Devart.Common.Entity.d2.a(n A_0, String A_1, n A_2, a9& A_3)
在 Devart.Common.Entity.d2.a(eg A_0)
在 Devart.Common.Entity.d2.a(n A_0, String A_1, n A_2, a9& A_3)
在 Devart.Data.Oracle.Entity.a2.a(bt A_0, n A_1)
在 Devart.Data.Oracle.Entity.a2.a(f A_0)
在 Devart.Common.Entity.d2.a(n A_0, String A_1, n A_2, a9& A_3)
在 Devart.Common.Entity.d2.a(eg A_0)
在 Devart.Common.Entity.d2.a(n A_0, Boolean A_1, a9& A_2)
在 Devart.Common.Entity.d2.a(ek A_0, List`1& A_1)
在 Devart.Data.Oracle.Entity.a2.a(ek A_0, List`1& A_1)
在 Devart.Common.Entity.d2.b(ek A_0, List`1& A_1)
在 Devart.Data.Oracle.Entity.ag.a(ek A_0, DbCommandBase A_1)
在 Devart.Common.Entity.eo.c()
在 Devart.Data.Oracle.Entity.OracleEntityProviderServices.CreateDbCommandDefinition(DbProviderManifest baseProviderManifest, DbCommandTree commandTree)
在 System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree, DbInterceptionContext interceptionContext, IDbDependencyResolver resolver, BridgeDataReaderFactory bridgeDataReaderFactory, ColumnMapFactory columnMapFactory)
gavinluo
 
Posts: 1
Joined: Mon 23 May 2016 06:26

Re: EF6 OUTER APPLY is not supported by Oracle Database 11g and lower.

Postby Shalex » Mon 23 May 2016 14:23

As a solution, we recommend you to upgrade your Oracle server: the OUTER APPLY/CROSS APPLY constructions are supported by Oracle server starting from the 12c version.

If usage of Oracle 12c is not available, please take into account the following information which may help you to find a workaround. Our implementation in dotConnect for Oracle avoids generation of OUTER APPLY/CROSS APPLY if it is possible, but some LINQ queries cannot be translated without employing OUTER APPLY/CROSS APPLY. In this case you should rewrite your LINQ statement. Scenarios which lead to CROSS APPLY/OUTER APPLY are listed at http://forums.devart.com/viewtopic.php?t=23362.
Shalex
Devart Team
 
Posts: 7606
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle