You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have defined the following property convention with the intent of limiting the precision of all double values to 15 as written to an Oracle dB:
public class PrecisionConvention : IPropertyConvention
{
public void Apply(IPropertyInstance instance)
{
if (instance.Type == typeof(double)) instance.Precision(15);
}
}
I have a value with exceedingly high precision for a Percentage class being written to the dB. I can see that the precision is being updated for my Percentage class by PrecisionConvention; however, when the value is written to the dB, it is done so at its unmodified precision.
What is the expected correct behavior?
Setting the precision via an implementation of IPropertyConvention should be reflected in the database.
Impact
The inability to limit the precision when writing to the dB is causing the Oracle client to bomb out - there's a known issue with Oracle where doubles may be written to the dB in higher precision than can be represented by C# (I reported this issue long ago to them but still have yet to see a fix), so I need a way to limit the precision for all doubles before write. I'd like to request either a fix or a recommendation for a workaround.
The text was updated successfully, but these errors were encountered:
Schema update does not currently update the precision of columns if the [base] type is the same. So, this is a
Duplicate of nhibernate/nhibernate-core#1895 (comment)
What is the current bug behavior?
I have defined the following property convention with the intent of limiting the precision of all double values to 15 as written to an Oracle dB:
I have a value with exceedingly high precision for a
Percentage
class being written to the dB. I can see that the precision is being updated for myPercentage
class byPrecisionConvention
; however, when the value is written to the dB, it is done so at its unmodified precision.What is the expected correct behavior?
Setting the precision via an implementation of
IPropertyConvention
should be reflected in the database.Impact
The inability to limit the precision when writing to the dB is causing the Oracle client to bomb out - there's a known issue with Oracle where doubles may be written to the dB in higher precision than can be represented by C# (I reported this issue long ago to them but still have yet to see a fix), so I need a way to limit the precision for all doubles before write. I'd like to request either a fix or a recommendation for a workaround.
The text was updated successfully, but these errors were encountered: