diff --git a/dbptk-model/src/main/java/com/databasepreservation/model/structure/type/SimpleTypeNumericExact.java b/dbptk-model/src/main/java/com/databasepreservation/model/structure/type/SimpleTypeNumericExact.java index 557ee5efc..2d191d803 100644 --- a/dbptk-model/src/main/java/com/databasepreservation/model/structure/type/SimpleTypeNumericExact.java +++ b/dbptk-model/src/main/java/com/databasepreservation/model/structure/type/SimpleTypeNumericExact.java @@ -21,6 +21,9 @@ public class SimpleTypeNumericExact extends Type { private Integer scale; + private static final Integer SIMPLE_TYPE_NUMERIC_EXACT_DEFAULT_PRECISION = 53; + private static final Integer SIMPLE_TYPE_NUMERIC_EXACT_DEFAULT_SCALE = 10; + /** * Exact numeric, like int or integer */ @@ -37,8 +40,13 @@ public SimpleTypeNumericExact() { * the number of digits after the radix point (optional) */ public SimpleTypeNumericExact(Integer precision, Integer scale) { - this.precision = precision; - this.scale = scale; + if (precision == 0 && scale == 0) { + this.precision = SIMPLE_TYPE_NUMERIC_EXACT_DEFAULT_PRECISION; + this.scale = SIMPLE_TYPE_NUMERIC_EXACT_DEFAULT_SCALE; + } else { + this.precision = precision; + this.scale = scale; + } } /**