diff --git a/src/Dynamicweb.DataIntegration.Providers.ODataProvider.csproj b/src/Dynamicweb.DataIntegration.Providers.ODataProvider.csproj index cbd7191..29bd6c6 100644 --- a/src/Dynamicweb.DataIntegration.Providers.ODataProvider.csproj +++ b/src/Dynamicweb.DataIntegration.Providers.ODataProvider.csproj @@ -1,6 +1,6 @@  - 10.8.9 + 10.8.10 1.0.0.0 OData Provider The Odata Provider lets you fetch and map data from or to any OData endpoint. diff --git a/src/ODataWriter.cs b/src/ODataWriter.cs index fee0da7..b86a685 100644 --- a/src/ODataWriter.cs +++ b/src/ODataWriter.cs @@ -2,6 +2,7 @@ using Dynamicweb.DataIntegration.EndpointManagement; using Dynamicweb.DataIntegration.Integration; using Dynamicweb.DataIntegration.Integration.Interfaces; +using Dynamicweb.DataIntegration.ProviderHelpers; using Dynamicweb.DataIntegration.Providers.ODataProvider.Model; using Dynamicweb.Ecommerce; using Dynamicweb.Ecommerce.Orders; @@ -39,7 +40,15 @@ internal ODataWriter(ILogger logger, Mapping mapping, Endpoint endpoint, ICreden Credentials = credentials; Mapping = mapping; EndpointAuthenticationService = new EndpointAuthenticationService(); - var originalDestinationTables = Mapping.Destination.GetOriginalDestinationSchema().GetTables(); + TableCollection originalDestinationTables; + if (Feature.IsActive()) + { + originalDestinationTables = JobSchemaService.GetSchema(Mapping.Destination).GetTables(); + } + else + { + originalDestinationTables = Mapping.Destination.GetOriginalDestinationSchema().GetTables(); + } var originalDestinationMappingTable = originalDestinationTables.FirstOrDefault(obj => obj.Name == Mapping.DestinationTable.Name); _destinationPrimaryKeyColumns = originalDestinationMappingTable?.Columns.Where(obj => obj.IsPrimaryKey)?.ToDictionary(obj => obj.Name, obj => obj.Type) ?? new Dictionary(); _responseMappings = Mapping.GetResponseColumnMappings();