From acc3fd522349a5fe8744d31020cb1363fbcfc0bd Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Wed, 26 Apr 2023 23:46:59 +0800 Subject: [PATCH] Revert "Set the precision to be maximum of 28 (Jet limit)." This reverts commit a1904bf1131308c5c533030988ded74c7e137197. --- .../Storage/Internal/JetDecimalTypeMapping.cs | 15 +-------------- test/EFCore.Jet.FunctionalTests/config.json | 8 ++++---- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/EFCore.Jet/Storage/Internal/JetDecimalTypeMapping.cs b/src/EFCore.Jet/Storage/Internal/JetDecimalTypeMapping.cs index 12de982..5b313a6 100644 --- a/src/EFCore.Jet/Storage/Internal/JetDecimalTypeMapping.cs +++ b/src/EFCore.Jet/Storage/Internal/JetDecimalTypeMapping.cs @@ -53,20 +53,7 @@ namespace EntityFrameworkCore.Jet.Storage.Internal /// doing so can result in application failures when updating to a new Entity Framework Core release. /// protected override RelationalTypeMapping Clone(RelationalTypeMappingParameters parameters) - { - var precision = parameters.Precision; - var scale = parameters.Scale; - if (parameters.Precision is > 28) - { - int prec_diff = parameters.Precision.Value - 28; - precision = 28; - if (parameters.Scale is > 28) - { - scale = parameters.Scale.Value - prec_diff; - } - } - return new JetDecimalTypeMapping(parameters.WithPrecisionAndScale(precision, scale)); - } + => new JetDecimalTypeMapping(parameters); /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to diff --git a/test/EFCore.Jet.FunctionalTests/config.json b/test/EFCore.Jet.FunctionalTests/config.json index d97040e..6c66070 100644 --- a/test/EFCore.Jet.FunctionalTests/config.json +++ b/test/EFCore.Jet.FunctionalTests/config.json @@ -1,7 +1,7 @@ { - "Test": { - "Jet": { - "DefaultConnection": "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Jet.accdb;Persist Security Info=False;" + "Test": { + "Jet": { + "DefaultConnection": "DBQ=Jet.accdb" + } } - } }