Error generating SQL schema with decimal(38,16)

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
vifani
Posts: 17
Joined: Thu 05 Aug 2010 16:20

Error generating SQL schema with decimal(38,16)

Post by vifani » Fri 26 Aug 2011 08:29

Generating SQL schema from EDMX designer using your devart TT, we get the following error:

The SSDL generated by the activity called ‘CsdlToSsdlAndMslActivity’ is not valid and has the following errors:
Precision ‘38’ is not valid. Precision must be between ‘1’ and ‘29’ for ‘decimal’ type.

I set a decimal field type with 38 precision and 19 scale. I have no errors generating SQL schema for SQL Server.

If I try to manually create a table on Oracle using NUMBER(38,19) as type, I have no errors, so I think there is a problem with your field type validation.

Can you help me?

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 29 Aug 2011 16:57

We have reproduced the error. We will investigate the issue and notify you about the results.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 31 Aug 2011 12:53

This is a designed behaviour.
We have to take into account only .NET types (not Oracle types) in the Model-first approach. No sense to create column in Oracle if its values do not have the corresponding .NET representation. The maximum precision of .NET type System.Decimal is 28.
It will be incorrect behaviour if precision is lost when reading the value of NUMBER(38,19) from database or if its value is greater than maximum value of the original .NET type property.

Post Reply