0 Replies Latest reply on Jun 26, 2013 10:52 AM by 65b80fb1-d5e6-49e0-868d-0a3cbccea95c

    Entity Framework : Outer Joins





      I'm trying to solve some issues with an application that I'm developing....


      I have a problem with outer joins:


      var query = (from i in dbo.ITEMs

                               join o in dbo.ORGANIZATIONs on i.ORGSEQNO equals o.ORGSEQNO

                               join iv in dbo.ITEMVERSIONs on i.ITEMSEQNO equals iv.ITEMSEQNO

                               join it in dbo.ITEMTARGETs on iv.VERSIONSEQNO equals it.VERSIONSEQNO

                               join id in dbo.ITEMDESCRIPTIONs.DefaultIfEmpty() on it.ITEMTARGETSEQNO equals id.ITEMTARGETSEQNO

                               select i).AsQueryable();


      If I remove the DefaultIfEmpty the query works as expected, with the "DefaultIfEmpty" in, it generates a sub-select that doesn't execute.


      1 ORA-00904: "SingleRowTable3"."X": invalid identifier SQL1.sql 44 23


      This is the occorring error.




      Thanks for your help.