I am using dotConnect for Oracle 5.70.140.0
I get a NotSupportedException for the following query:
Code: Select all
List myObject2s = context.MyObjects.Where( n => n.ObjectID == objectID).Select( o => o.MyObject2s ).ToList();
I want to retrieve all MyObject2s into a list that belong to a MyObject with the given ID.
Stacktrace
Code: Select all
System.NotSupportedException: Specified method is not supported. at Devart.Data.Linq.Provider.h.a(ax A_0)
at Devart.Data.Linq.Provider.h.a(SqlExpression A_0)
at Devart.Data.Linq.Provider.h.a(bi A_0)
at Devart.Data.Linq.Provider.h.a(SqlExpression A_0)
at Devart.Data.Linq.Provider.h.a(SqlExpression A_0, Boolean A_1)
at Devart.Data.Linq.Provider.m.a(u A_0, SqlExpression A_1, Boolean A_2)
at Devart.Data.Linq.Provider.m.a(u A_0, SqlExpression A_1)
at Devart.Data.Linq.Provider.m.a(Type A_0, SqlExpression A_1, u A_2)
at Devart.Data.Linq.Provider.DataProvider.CompiledQuery.GetReaderFactory(List`1 elementInstanceTypes, u services, SqlNode query)
at Devart.Data.Linq.Provider.DataProvider.CompiledQuery..ctor(QueryInfo queryInfo, u services, Boolean isQueryObjectByKey, Object queryObjectKey)
at Devart.Data.Linq.Provider.DataProvider.BuildQuery(Expression query)
at Devart.Data.Linq.Provider.DataProvider.Devart.Data.Linq.Provider.IProvider.Compile(Expression query)
at Devart.Data.Linq.DataQuery`1.i()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
If i divide the query into 2 subqueries (one to retrieve MyObject and one to get the MyObject2 in a seperate query) then it works. Could be an issue with ToList or associations.
Any help would be appreciated.