Skip to content

NH-3976 - Inconsistent Decimal/NHibernateUtil.Currency handling causing runtime error when using Oracle.ManagedDataAccess #1052

@nhibernate-bot

Description

@nhibernate-bot

Nekrasov Aleksandr created an issue — 4th April 2017, 11:44:05:

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions