BUG: Number(1,0) to Boolean System.Data.MappingException with ODAC v112030
DNETFXJan 30 2012 — edited Dec 5 2012I am using ODAC release version 112030.
I mapped a nullable boolean property to a nullable number(1,0) column (database first).
Validation of edmx passes without errors or warnings.
My App.Config contains the following section:
<oracle.dataaccess.client>
<settings>
<add name="bool" value="edmmapping number(1,0)" />
<add name="byte" value="edmmapping number(3,0)" />
<add name="int16" value="edmmapping number(5,0)" />
<add name="int32" value="edmmapping number(10,0)" />
<add name="int64" value="edmmapping number(19,0)" />
<add name="int16" value="edmmapping number(38,0)" />
<add name="int32" value="edmmapping number(38,0)" />
<add name="int64" value="edmmapping number(38,0)" />
</settings>
</oracle.dataaccess.client>
Where I added the last 3 lines as a workaround for unspecified precision in a legacy schema.
If I remove the boolean property the code runs as expected.
Is I add the boolean property (mapped to a number(1,0) column), when the first query runs, I received the following exception:
Type: System.Data.MappingException
Message:
Schema specified is not valid. Errors:
Nre.msl(82,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=True,DefaultValue=]' of member 'IsImported' in type 'Model.EntityType1' is not compatible with 'OracleEFProvider.number[Nullable=True,DefaultValue=,Precision=1,Scale=0]' of member 'IMPORTED' in type 'Model.Store.TABLE_1'.