When attempting to expand multiple levels we receive the exception "Column addition failed for symbol type 'Devart.Common.Entity.ae' and current expression 'Devart.Common.Entity.ae'." Unfortunately the actual EF query is being generated by WebAPI and I could not find a way to extract it for reference.
I was hoping you might have insight on what might be causing the issue, and a potential fix. If there is any additional information I could provide please let me know.
Versions
All packages have been checked for updates and are running the latest versions.
WebAPI 2.2 for OData v1-3 (v5.4.0)
EntityFramework (v6.1.3)
dotConnect (v8.4.379)
Oracle (12g)
OData URL for reference
http://localhost/odata3/v1/Site?$expand ... ionAddress
Full Error Message
Code: Select all
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code/>
<m:message xml:lang="en-US">An error has occurred.</m:message>
<m:innererror>
<m:message>
Exception has been thrown by the target of an invocation.
</m:message>
<m:type>System.Reflection.TargetInvocationException</m:type>
<m:stacktrace>
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Http.OData.Query.ODataQueryOptions.LimitResults(IQueryable queryable, Int32 limit, Boolean& resultsLimited)
at System.Web.Http.OData.Query.ODataQueryOptions.ApplyTo(IQueryable query, ODataQuerySettings querySettings)
at System.Web.Http.OData.EnableQueryAttribute.ExecuteQuery(Object response, HttpRequestMessage request, HttpActionDescriptor actionDescriptor)
at System.Web.Http.OData.EnableQueryAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
at System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
</m:stacktrace>
<m:internalexception>
<m:message>
An error occurred while preparing the command definition. See the inner exception for details.
</m:message>
<m:type>
System.Data.Entity.Core.EntityCommandCompilationException
</m:type>
<m:stacktrace>
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree, DbInterceptionContext interceptionContext, IDbDependencyResolver resolver, BridgeDataReaderFactory bridgeDataReaderFactory, ColumnMapFactory columnMapFactory)
at System.Data.Entity.Core.EntityClient.Internal.EntityProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.CreateCommandDefinition(ObjectContext context, DbQueryCommandTree tree)
at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare(ObjectContext context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Boolean streaming, Span span, IEnumerable`1 compiledQueryParameters, AliasGenerator aliasGenerator)
at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__6()
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Web.Http.OData.Query.TruncatedCollection`1..ctor(IQueryable`1 source, Int32 pageSize)
at System.Web.Http.OData.Query.ODataQueryOptions.LimitResults[T](IQueryable`1 queryable, Int32 limit, Boolean& resultsLimited)
</m:stacktrace>
<m:internalexception>
<m:message>
Column addition failed for symbol type 'Devart.Common.Entity.ae' and current expression 'Devart.Common.Entity.ae'.
</m:message>
<m:type>System.InvalidOperationException</m:type>
<m:stacktrace>
at Devart.Common.Entity.as.a(ds A_0, cj A_1, List`1 A_2, Dictionary`2 A_3, String& A_4)
at Devart.Common.Entity.as.a(ds A_0, ds A_1)
at Devart.Common.Entity.as.a(dm A_0, ds A_1, dd A_2, Int32 A_3)
at Devart.Common.Entity.as.a(IList`1 A_0, ew A_1, String A_2, bs A_3)
at Devart.Data.Oracle.Entity.aa.a(el A_0)
at Devart.Common.Entity.as.a(bs A_0, String A_1, bs A_2, cj& A_3)
at Devart.Common.Entity.as.a(bu A_0)
at Devart.Common.Entity.as.a(bs A_0, String A_1, bs A_2, cj& A_3)
at Devart.Common.Entity.as.a(ar A_0)
at Devart.Common.Entity.as.a(bs A_0, String A_1, bs A_2, cj& A_3)
at Devart.Common.Entity.as.a(bu A_0)
at Devart.Common.Entity.as.a(bs A_0, Boolean A_1, cj& A_2)
at Devart.Common.Entity.as.e(bs A_0)
at Devart.Data.Oracle.Entity.aa.a(e1 A_0, List`1& A_1)
at Devart.Data.Oracle.Entity.ag.a(e1 A_0, DbCommandBase A_1)
at Devart.Common.Entity.e6.c()
at Devart.Data.Oracle.Entity.OracleEntityProviderServices.CreateDbCommandDefinition(DbProviderManifest baseProviderManifest, DbCommandTree commandTree)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree, DbInterceptionContext interceptionContext, IDbDependencyResolver resolver, BridgeDataReaderFactory bridgeDataReaderFactory, ColumnMapFactory columnMapFactory)
</m:stacktrace>
</m:internalexception>
</m:internalexception>
</m:innererror>
</m:error>