Note that there are some explanatory texts on larger screens.

plurals
  1. POODAC 11.2 Release 4 (11.2.0.3.0) throwing "Oracle 11.2.0.2.0 does not support APPLY" exception
    primarykey
    data
    text
    <p>I'm using Entity Framework with the new ODAC that oracle just released.</p> <p>My problem is that some of my queries that were working in previous beta releases stopped working in this new release version.</p> <p>Here's an example:</p> <pre><code>IQueryable&lt;SYS_PERFIL&gt; query1 = m.DBContext.SYS_PERFIL.Where(T =&gt; T.SYS_UTILIZADOR.Where(TT =&gt; TT.ACTIVO == 1).Count() &gt; 0); IQueryable&lt;SYS_PERFIL&gt; query2 = m.DBContext.SYS_PERFIL.Where(T =&gt; T.SYS_UTILIZADOR.FirstOrDefault(TT =&gt; TT.ACTIVO == 1) != null); string test1Query = ((System.Data.Objects.ObjectQuery)query1).ToTraceString(); string test2Query = ((System.Data.Objects.ObjectQuery)query2).ToTraceString(); var test1 = query1.ToList(); var test2 = query2.ToList(); </code></pre> <p>While test1 returns the currect result, test2 throws an oracle exception 'ORA-00905: missing keyword' with message: 'Oracle 11.2.0.2.0 does not support APPLY'.</p> <p>I don't want to re-test all of my methods. Is there a way to tell EF not to use apply?</p> <p>Here are the queries that EF is generating:</p> <p>test1Query:</p> <pre><code>SELECT "Project1"."PERFIL_ID" AS "PERFIL_ID" FROM ( SELECT "Extent1"."PERFIL_ID" AS PERFIL_ID", (SELECT COUNT(1) AS "A1" FROM "SMI2012"."SYS_UTILIZADOR" "Extent2" WHERE (("Extent1"."PERFIL_ID" = "Extent2"."PERFIL_ID") AND (1 = "Extent2"."ACTIVO"))) AS "C1" FROM "SMI2012"."SYS_PERFIL" "Extent1") "Project1" WHERE ("Project1"."C1" &gt; 0) </code></pre> <p>test2Query:</p> <pre><code>SELECT "Extent1"."PERFIL_ID" AS "PERFIL_ID" FROM "SMI2012"."SYS_PERFIL" "Extent1" CROSS APPLY (SELECT "Extent2"."PERFIL_ID" AS "PERFIL_ID", "Extent2"."ACTIVO" AS "ACTIVO", "Extent2"."USER_ID" AS "USER_ID" FROM "SMI2012"."SYS_UTILIZADOR" "Extent2" WHERE (("Extent1"."PERFIL_ID" = "Extent2"."PERFIL_ID") AND (1 = "Extent2"."ACTIVO")) AND (ROWNUM &lt;= (1) ) ) "Element1" WHERE ("Element1"."USER_ID" IS NOT NULL) </code></pre> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload