I defined a local model representing Salesforce using Devart's EntityDeveloper. We are able to update the model when the source changes. New columns are added to the model.
A query is defined:
Code: Select all
context.SubCommissions.Select(x => x.InvoiceNo_SubCommission).ToList()
- Outer exception is EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.
- Inner exception is InvalidOperationException: Unknown column 'Extent1.InvoiceNo_SubCommission'.
I' running dbmonitor while running the query. The last statement before the exception isat Devart.Data.Salesforce.ai.a.c(String A_0, String A_1)
at Devart.Data.Salesforce.ai.a.a()
at Devart.Data.Salesforce.ai.a.c(SqlSelect A_0)
at Devart.Data.Salesforce.ai.a(a A_0, SqlSelect A_1)
at Devart.Data.Salesforce.i.a(SqlSelect A_0, ParameterInfo[] A_1, Boolean A_2)
at Devart.Data.Salesforce.i..ctor(ab A_0, Boolean A_1, SqlSelect A_2, ParameterInfo[] A_3, Boolean A_4)
at Devart.Data.Salesforce.g.a(Object A_0, Boolean A_1, String A_2, Boolean A_3, ParameterInfo[] A_4)
at Devart.Data.Salesforce.SalesforceCommand.InternalPrepare(Boolean implicitPrepare, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Salesforce.Entity.d.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
The statement is highlighted red.Prepare: SELECT 1 AS C1, Extent1.Id AS Id, Extent1.Invoice AS Invoice, Extent1.Name AS Name, Extent1.Company AS Company, Extent1.ContactPerson AS ContactPerson, Extent1.Classification AS Classification, Extent1.AmountNet AS AmountNet, Extent1.InvoiceNo_SubCommission AS InvoiceNo_SubCommission FROM SubCommissions AS Extent1 WHERE NOT (0 = Extent1.AmountNet)
Using Fiddler I can see that the statement is never sent to Salesforce. Devart seems to determine that the statement is invalid and raises an exception.
I tried to modify and run the offending statement in the Salesforce Developer Console (adding __C) and it's run without an error.
thank you for your support!