Closed
Description
Christoph Strobl opened DATAMONGO-2590 and commented
Issue Links:
- DATACMNS-1615 Allow fine grained store specific converter registration
("depends on") - DATAMONGO-1517 Add support for Decimal128 BSON type
1 votes, 3 watchers
Christoph Strobl opened DATAMONGO-2590 and commented
Issue Links:
1 votes, 3 watchers
Activity
spring-projects-issues commentedon Jul 16, 2020
Jeff Yemin commented
BigDecimal is probably the more common type that users would want to map to Decimal128
christophstrobl commentedon Jan 20, 2021
BigDecimal
toDecimal128
conversion is possible by using the@Field
annotation as shown below.By registering a custom
BigInteger
->Decimal128
converter it is possible to apply the above also toBigInteger
properties.mp911de commentedon Jan 20, 2021
Should we consider defaulting to
Decimal128
for Spring Data 3.0 with a config setting to revert toString
?Mcfloy commentedon Mar 6, 2025
Sorry to necrobump 4 years later, I 100% agree with @mp911de on defaulting to
Decimal128
instead ofString
as we would be able to use expressions on numbers like$lt
,$lte
,$gt
,$gte
that we cannot do "easily" withString
as it would require the usage of$toDecimal
(in an aggregation).We missed the 3.0 milestone, but can we try to push this modification for the next version* ?
MongoCustomConversions.BigDecimalRepresentation.STRING
#49203 remaining items