This content has been marked as final. Show 5 replies
Extending the same question.
Does ODP.net provider 126.96.36.199.0 supports Code first approach with .net framework 4.0?
I am giving oracle support to the .Net application. It able to load the data but while retrieving it throws mapping error. I did not able to find a solution. The errors are as below.
Schema specified is not valid. Errors:
(16,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Guid[Nullable=False,DefaultValue=]' of member 'Id' in type 'MyNamespace.Account' is not compatible with 'OracleEFProvider.raw[Nullable=False,DefaultValue=,MaxLength=2000,FixedLength=False]' of member 'Id' in type 'CodeFirstDatabaseSchema.Account'.
(17,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=False,DefaultValue=]' of member 'IsUserEnteredValue' in type 'MyNamespace.Account' is not compatible with 'OracleEFProvider.number[Nullable=False,DefaultValue=,Precision=38,Scale=0]' of member 'IsUserEnteredValue' in type 'CodeFirstDatabaseSchema.Account'.
You help will be appreciated.
Hi. Still not supported. That said, those errors are just invalid mappings. I don't use Guids so I don't know how to map those, but you can map a number(1,0) to a boolean property by adding this to your app.config (or web.config):
Now, that error says that it thinks the column is a number(38,0). If that's really what it is, you should change it to a number(1,0) if you're only storing a boolean value there. (If you're storing more numbers, the boolean mapping won't make sense anyway.)
<oracle.dataaccess.client> <settings> <add name="bool" value="edmmapping number(1,0)" /> </settings> </oracle.dataaccess.client>