jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
561 stars 118 forks source link

Support @NumberFormat annotation for Big Integer and Short attribute types #3631

Open SergeiAksenov2 opened 3 weeks ago

SergeiAksenov2 commented 3 weeks ago

Environment: Jmix version: 2.3.999-SNAPSHOT Jmix Studio plugin version: 2.3.SNAPSHOT6714-241 IntelliJ version: IntelliJ IDEA 2024.1.4 (Community Edition) Java and Kotlin.

An exception is thrown if enter a number in the Short or Big Integer fields with NumberFormat annotation. @NumberFormat(pattern = "#") @Column(name = "SHORTT") private Short shortt;

DecimalFormat#format(...)

short log.txt big integer log.txt

image

glebfox commented 3 weeks ago

See io.jmix.core.metamodel.datatype.impl.AdaptiveNumberDatatype#requestedType