You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Ramya Vasanth (Jira)" <ji...@apache.org> on 2020/09/17 04:35:00 UTC

[jira] [Created] (OLINGO-1480) Error serializing BigDecimal when there is no Edm Property(EdmAssistedSerializer)

Ramya Vasanth created OLINGO-1480:
-------------------------------------

             Summary: Error serializing BigDecimal when there is no Edm Property(EdmAssistedSerializer)
                 Key: OLINGO-1480
                 URL: https://issues.apache.org/jira/browse/OLINGO-1480
             Project: Olingo
          Issue Type: Bug
    Affects Versions: (Java) V4 4.7.1
            Reporter: Ramya Vasanth


For dynamic properties the library sets a default scale and precision value in EdmAssistedSerializer.

When the database returns a BigDecimal (precision=0, scale=33): 1.666666666666666666666666666666667 as result of a compute function($apply), Olingo automatically translates it into EdmDecimal and when serializing in EdmAssistedJsonSerializer there is a default precision of 40 and scale of 25 set, so the check in EdmDecimal fails and throws "The value does not match facet constraints".

 

This can be fixed by changing the default scale value to scale value specified in BigDecimal value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)