abel533 / Mapper

Mybatis Common Mapper - Easy to use
https://mybatis.io
MIT License
7.32k stars 1.63k forks source link

selectByPrimaryKey查询无法正常赋值带``的属性 #826

Open powerLeePlus opened 3 years ago

powerLeePlus commented 3 years ago

Mybatis Generator生成表字段status时,自动带上了``,如下:

@Column(name = "`status`")
private Integer status;

然后发现使用selectByPrimaryKey查询时,status无法赋上值;

去掉``就好了

这是怎么回事,有人遇到过吗,是bug吗。还是Mybatis Generator的bug