Skip to content

Commit

Permalink
primary key can not be null
Browse files Browse the repository at this point in the history
  • Loading branch information
junwen12221 committed Jun 13, 2022
1 parent 08f3545 commit 21ea4a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/src/main/java/io/mycat/SimpleColumnInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ public SimpleColumnInfo(@NonNull String columnName, int precision, int scale, @N
default:
break;
}

//主键不能为null
if (primaryKey){
nullable = false;
}

this.jdbcType = jdbcType;
this.nullable = nullable;
this.autoIncrement = autoIncrement;
Expand Down

0 comments on commit 21ea4a8

Please sign in to comment.