Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Updated OracleTypeMap based on Oracle Documentation #349

Merged
merged 1 commit into from

4 participants

@kramerpr

Updated the default mapping of Int64 to NUMBER(19,0) to match the default type mapping used by Oracle.

See Table 3-4: Mapping of Oracle Data Types and EDM Types (http://docs.oracle.com/cd/E11882_01/win.112/e18754/featLINQ.htm)

Patrick Kramer Updated the default mapping of Int64 to NUMBER(19,0) to match the def…
…ault type mapping used by Oracle.

See Table 3-4: Mapping of Oracle Data Types and EDM Types (http://docs.oracle.com/cd/E11882_01/win.112/e18754/featLINQ.htm)
1d3eb38
@tommarien
Collaborator

@kramerpr Could you explain me why you want to change from NUMBER(20,0) to NUMBER(19,0), as far as i can see/know oracle(20,0) defines a UINT64 which is slightly to big but is on par with nhibernate map see https://github.com/nhibernate/nhibernate-core/blob/master/src/NHibernate/Dialect/Oracle8iDialect.cs

@TimSOS

That NHibernate article is for Oracle 8i (the current release is 11g R2) and from a third party. The official documentation from Oracle states that Int64 is mapped for numbers sized from 11-19. A number(20. 0) would be mapped to a Decimal .Net type. Entity and other ORMs would have to be fiddled with to recast this instead of using Oracle's native mapping. See link from OP for specifics.

@tommarien
Collaborator

@TimSOS The Oracle 8I typemap is showed is still the one used even for Oracle11g. But after rereading the documentation link @kramerpr provided it seems ok. I only hope no problems arise from users using fluentmigrator together with nhibernate.

@tommarien tommarien added this to the VNext milestone
@tommarien tommarien merged commit 1d3eb38 into schambers:master
@hazzik

Probably nhiberanate needs update here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 18, 2012
  1. Updated the default mapping of Int64 to NUMBER(19,0) to match the def…

    Patrick Kramer authored
    …ault type mapping used by Oracle.
    
    See Table 3-4: Mapping of Oracle Data Types and EDM Types (http://docs.oracle.com/cd/E11882_01/win.112/e18754/featLINQ.htm)
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/FluentMigrator.Runner/Generators/Oracle/OracleTypeMap.cs
View
2  src/FluentMigrator.Runner/Generators/Oracle/OracleTypeMap.cs
@@ -53,7 +53,7 @@ protected override void SetupTypeMaps()
SetTypeMap(DbType.Guid, "RAW(16)");
SetTypeMap(DbType.Int16, "NUMBER(5,0)");
SetTypeMap(DbType.Int32, "NUMBER(10,0)");
- SetTypeMap(DbType.Int64, "NUMBER(20,0)");
+ SetTypeMap(DbType.Int64, "NUMBER(19,0)");
SetTypeMap(DbType.Single, "FLOAT(24)");
SetTypeMap(DbType.StringFixedLength, "NCHAR(255)");
SetTypeMap(DbType.StringFixedLength, "NCHAR($size)", UnicodeStringCapacity);
Something went wrong with that request. Please try again.