auto set ID to int

This commit is contained in:
Mystikfluu 2023-06-04 18:12:50 +02:00
parent aca4c8d933
commit 1be3380560
2 changed files with 8 additions and 0 deletions

View File

@ -1366,6 +1366,11 @@ public class B3
for (Graphic_Main_Elem gme : readModel) {
gme.setGc(this.currentTab.canvas.getGraphicsContext2D());
if(gme instanceof Graphic_ATTR_Elem) {
if(gme.name.equalsIgnoreCase("id")) {
((Graphic_ATTR_Elem) gme).datatype = "int";
}
}
gme.isVisible = true;
}

View File

@ -43,6 +43,9 @@ public abstract class Graphic_ATTR_Elem
}
this.columnPostfix = "";
this.datatype = "varchar(100)";
if(this.name.equalsIgnoreCase("id")) {
this.datatype = "int";
}
this.isAutoincrement = false;
this.isKey = this instanceof Graphic_ATTR_Key_Elem || this instanceof Graphic_ATTR_Weak_Key_Elem;