OData / OData/AspNetCoreOData

Odata decimal key 404 - EDM precision/scale settings not respected

Open
#492 12 comments 1 reaction 1 assignee View on GitHub

@KenitoInc is already working on this.

Since Feb 1, 2022.

investigating
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Using Aspnet core odata 8.0.6

http://localhost:5051/odata/wsdb/Jobbhist(261210.08)
The value when entering the controller is 261210.1 and not the expected 261210.08.
EDM-type of key is decimal (14,2), clr type is decimal
This should work according to OData 4 spec.

http://localhost:5051/odata/wsdb/Jobbhist(261210.08M) <-- this works.

OData 4 spec: http://docs.oasis-open.org/odata/new-in-odata/v4.0/cn01/new-in-odata-v4.0-cn01.html#_Toc366145490
3.2.10 Pruned: URI Literal suffixes for numeric types
Decimal, Double, Single, and Int64 literals in URIs no longer need to specify "M", "D", "F", or "L" suffixes when used in URIs

Might be related (but seems old..) OData/odata.net#461

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.