Inconsistent Decimal/NHibernateUtil.Currency handling causing runtime error when using Oracle.ManagedDataAccess

Description

According this odp's documentation page DbType.Currency is not supported. So
Oracle10gDialect/OracleManagedDataClientDriver should 'remap' CurrencyType to appropriate oracles NUMBER variant, just like OracleManagedDataClientDriver does for DbType.Boolean or DbType.Guid types.

Another issue with using decimal is inconsistency between NHibernateUtil.GuessType and TypeFactory.HeuristicType - GuessType returns NHibernate.Type.CurrencyType provided decimal value whereas HeuristicType returns NHibernate.Type.DecimalType.

It also happens that when sql types are derived for mappings TypeFactory's method is used and everything works fine. However on my project I have to guess type from a value so followed documentation for TypeFactory and used NHibernate.GuessType which lead to runtime errors.

Please check project in the attachment (requires valid connection string in app.config)

Environment

Oracle.ManagedDataAccess

Attachments

1

Activity

Show:

Frédéric Delaporte March 9, 2018 at 9:34 AM

Moved here

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?

Created April 4, 2017 at 11:44 AM
Updated March 9, 2018 at 9:34 AM
Resolved March 9, 2018 at 9:34 AM
Who's Looking?