Our situation looks as follows:
Code: Select all
StringBuilder queryString = new StringBuilder(@"SELECT value x FROM DB.A as A join DB.B as B on (B.A.AID = A.AID) where B.Date = ANYELEMENT((select value max(B1.Date) from DB.B as B1 where B1.A.AId = A.AID)) and B.C.CId = 7");
ObjectQuery qu = new ObjectQuery(queryString.ToString(), context);
List result = qu
.Include("D.E")
.Include("F")
.Include("G.H.I")
.Include("G.H.J")
.Execute(MergeOption.NoTracking).ToList();
List result2= null;
ObjectQuery qu2;
qu2 = (ObjectQuery)(from code in context.Zs
select x1);
reuslt2= qu2
.Include("Y.W")
.Include("V")
.Include("U.T")
.Execute(MergeOption.NoTracking).ToList();
With "TypedNulls = true" the first query fails while the second request works fine.
(I should also remark that the 'A' in the first query is a quite complex object, with a lot of references to other elements)...