0

I'm using mssql and my table have a NUMERIC(20) field. I'm trying to convert it to string on the get function but the this.getDataValue('code') is returning a truncated int (8985353050864662000)

code: {
  type: DataTypes.NUMBER(20),
  get() {
    return this.getDataValue('code').toString();
  }
}

The original number is a java UUID (8985353050864661894)

Diego Gurgel
  • 166
  • 2
  • 8
  • That is a mighty large number. Are you sure that you need to use a number here? Depending on what that number represents it may be that a varchar is actually more appropriate. – Sean Lange Aug 02 '18 at 18:14
  • I totally agree. But this table was created for another application. – Diego Gurgel Aug 02 '18 at 18:35

0 Answers0