问题原因:实体类没有设置主键
解决办法
/**
* 成绩id
*/
@TableId(value="aid", type= IdType.AUTO)//规定主键
private Integer aid;
@Override//返回主键值
protected Serializable pkVal() {
return this.aid;
}
问题原因:实体类没有设置主键
解决办法
/**
* 成绩id
*/
@TableId(value="aid", type= IdType.AUTO)//规定主键
private Integer aid;
@Override//返回主键值
protected Serializable pkVal() {
return this.aid;
}