Giter Site home page Giter Site logo

Comments (3)

texttechne avatar texttechne commented on June 2, 2024

Hi @bi-tm,

yeah that was a breaking change in the v2-to-v4-converter: here's the commit

Does it really make sense to convert Edm.Decimal to number? You could have a potential precision loss...

from odata2ts.

texttechne avatar texttechne commented on June 2, 2024

Ok, I've introduced this breaking change in the wake of developing the converter-ui5-v2: The V2 OData model of SAP doesn't convert Edm.Int64 or Edm.Decimal. I think I was a little helpless there...

I've found a better solution now:

  • by default, the converter-v2-to-v4 will transform both types to number
  • this is how V4 behaves anyway
  • I've added a bigNumberNoopConverter which overrides this behaviour and leaves the types to be string
    • this is used by the converter-ui5-v2

Please update @odata2ts/converter-v2-to-v4 to version 0.3.0.

from odata2ts.

texttechne avatar texttechne commented on June 2, 2024

@bi-tm if this works for you, then please close the ticket.

And the question from my side remains: Don't you have any concerns regarding precision loss? Or is this data type mapping just a little bit imprecise (like Edm.Double would be already enough but it's mapped to Edm.Decimal anyway)?

from odata2ts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.