I'm using the new production release of ODAC 12c Release 3 (12.1.0.2.1) and upgrading an EF5 application to EF6. I've followed all the guidelines (using the unmanaged route) and am getting a db connection but in some of the data fetches I'm getting data mapping errors like this:
Schema specified is not valid. Errors: EF.StwtAdoModel.msl(396,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Int16[Nullable=True,DefaultValue=]' of member 'TC_ORG_LEVEL' in type 'Model1.TC' is not compatible with 'OracleEFProvider.number[Nullable=True,DefaultValue=,Precision=1,Scale=0]' of member 'TC_ORG_LEVEL' in type 'Model1.Store.TC'.
The migration documentation that came with this version of ODAC suggests that I "Modify the Oracle data type to .NET data type mappings as required by your application." points me to a section which suggests I add this to my App.Config file:
<oracle.unmanageddataaccess.client>
<version number="*">
<edmMappings>
<edmNumberMapping>
<add NETType="bool" MinPrecision="1" MaxPrecision="1" DBType="Number" />
<add NETType="byte" MinPrecision="2" MaxPrecision="3" DBType="Number" />
<add NETType="int16" MinPrecision="4" MaxPrecision="5" DBType="Number" />
<add NETType="int32" MinPrecision="6" MaxPrecision="10" DBType="Number" />
<add NETType="int64" MinPrecision="11" MaxPrecision="19" DBType="Number"/>
</edmNumberMapping>
</edmMappings>
</version>
</oracle.unmanageddataaccess.client>
But this has little effect. I already have an .edmx but am stuck getting it to use these mappings to resolve the errors. Any advice?
As an aside, I'm not convinced the mapping is correct since TC_ORG_LEVEL is NUMBER(1) in my Oracle table which accepts values 0 to 9 - if the (1) is what is referred to by the Min/MaxPrecision range, how is this expected to map to a Bool?