Error 2019 - custom mapping conflict between Int16 and bool
840689Mar 7 2012 — edited May 24 2012Most of our tables include NUMBER(1,0) fields which are being used to store a boolean value.
As documented in other posts, adding the following to the app.config allows us to get Oracle EF to treat these fields as boolean values.
<oracle.dataaccess.client>
<settings>
<add name="bool" value="edmmapping number(1,0)" />
</settings>
</oracle.dataaccess.client>
---
Unfortunately we also have NUMBER(1,0) fields which actually need to be treated as an int16. (As an example, a "DayOfWeek" field)
Of course when we attempt to set this field to an int16 within the EF designer, we are now receiving the following 2019 error:
Error 2019: Member Mapping specified is not valid. The type 'Edm.Int16[Nullable=True,DefaultValue=]' of member 'DayOfWeek' in type 'xxx' is not compatible with 'OracleEFProvider.number[Nullable=True,DefaultValue=,Precision=1,Scale=0]' of member 'DAY_OF_WEEK' in type 'yyy'.
How can we resolve this issue?