Skip to content

Commit 155980f

Browse files
committed
Math Opertions: Cast to result type to get real scale for certain operations
1 parent 766d45f commit 155980f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/MathCompilers.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
1+
// Copyright (C) 2003-2010 Xtensive LLC.
22
// This code is distributed under MIT license terms.
33
// See the License.txt file in the project root for more information.
44
// Created by: Denis Krjuchkov
@@ -607,7 +607,8 @@ private static SqlExpression TryCastToDecimalPS(SqlExpression value, short preci
607607
{
608608
var context = ExpressionTranslationContext.Current;
609609
var provider = context.ProviderInfo.ProviderName;
610-
if (provider.Equals(WellKnown.Provider.PostgreSql, StringComparison.Ordinal)) {
610+
if (provider.Equals(WellKnown.Provider.PostgreSql, StringComparison.Ordinal)
611+
|| provider.Equals(WellKnown.Provider.Oracle, StringComparison.Ordinal)) {
611612
// to fit result into .Net decimal since Npgsql client libarary does not provide a way to make in on reading
612613
return SqlDml.Cast(value, SqlType.Decimal, precision, scale);
613614
}

0 commit comments

Comments
 (0)