Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1480

Error serializing BigDecimal when there is no Edm Property(EdmAssistedSerializer)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • (Java) V4 4.7.1
    • None
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ramyav Ramya Vasanth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: