File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
dbptk-model/src/main/java/com/databasepreservation/model/structure/type Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ public class SimpleTypeNumericExact extends Type {
2121
2222 private Integer scale ;
2323
24+ private static final Integer SIMPLE_TYPE_NUMERIC_EXACT_DEFAULT_PRECISION = 53 ;
25+ private static final Integer SIMPLE_TYPE_NUMERIC_EXACT_DEFAULT_SCALE = 10 ;
26+
2427 /**
2528 * Exact numeric, like int or integer
2629 */
@@ -37,8 +40,13 @@ public SimpleTypeNumericExact() {
3740 * the number of digits after the radix point (optional)
3841 */
3942 public SimpleTypeNumericExact (Integer precision , Integer scale ) {
40- this .precision = precision ;
41- this .scale = scale ;
43+ if (precision == 0 && scale == 0 ) {
44+ this .precision = SIMPLE_TYPE_NUMERIC_EXACT_DEFAULT_PRECISION ;
45+ this .scale = SIMPLE_TYPE_NUMERIC_EXACT_DEFAULT_SCALE ;
46+ } else {
47+ this .precision = precision ;
48+ this .scale = scale ;
49+ }
4250 }
4351
4452 /**
You can’t perform that action at this time.
0 commit comments