Edm.Decimal not compatible with Devart.Data.Oracle.double

Edm.Decimal not compatible with Devart.Data.Oracle.double

Postby i.kopcanski » Thu 26 Nov 2009 13:10

I have the two .edmx models, one per each of structurally identical MSSQL and Oracle databases. One of tables contain column of type:

MSSQL - numeric(15,2) translated to:
in ssdl.

in csdl.
System.Nullable admin_costs in generated code.

Oracle - number(15, 2) translated to:
in ssdl.

in csdl.
System.Nullable ADMIN_COSTS in generated code.

We are sharing csdl and code-behind files from MSSQL edmx file,
and msl and ssdl files are model specific. This strategy works when we are using MSSQL database, but with oracle database we get this exception:

error 2019: Member Mapping specified is not valid. The type 'Edm.Decimal[Nullable=True,DefaultValue=,Precision=,Scale=]' of member 'admin_costs' in type 'ModelSuperSets.vw_superset_debtorgroups' is not compatible with 'Devart.Data.Oracle.double[Nullable=True,DefaultValue=]' of member 'ADMIN_COSTS' in type 'ModelSuperSets.Store.VW_SUPERSET_DEBTORGROUPS'

So, obviously, the problem is mapping between decimal values in csdl files in MSSQL with double values in ssdl files.

Could you please, helpa us with this, cause we have a lot of simmilar issues for other columns. Thank you in advance.
Posts: 7
Joined: Mon 09 Nov 2009 17:36

Postby AndreyR » Thu 26 Nov 2009 16:14

This is default mapping. You'll have to change the types for compatibility.
If you are using Entity Developer, you can edit Storage model in design time.
In other case you'll have to use XML Editor and edit the model manually.
We plan to add a feature to help in this scenario, but no timeframe is available.
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Return to dotConnect for Oracle