Skip to content

Auto-generated Model Types Decimal Fields as String #210

@hansanawijethunga

Description

@hansanawijethunga

Data types generated i incorrectly types certain Dataverse Edm.Decimal fields as TypeScript string. When these string values are serialized and sent to the OData endpoint, the server rejects the payload because it expects a numeric type, not a string-encoded value.

Error
ODataException: Cannot convert a value to target type 'Edm.Decimal' because of
conflict between input format string/number and parameter
'IEEE754Compatible' false/true.

Full path in stack trace:
ODataJsonLightPropertyAndValueDeserializer.ReadPrimitiveValue
ODataJsonLightResourceDeserializer.ReadEntryDataProperty
ODataInputFormatterHelper.ReadFromStream

Affected Field Types

Any Edm.Decimal or Edm.Double column whose generated TypeScript type is string instead of number.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions