Mapping error between query result and JavaBean
qsimu opened this issue · 1 comments
qsimu commented
`
@Table("pre_webset")
public class Webset {
@Id
@Column("`key`")
private String key;
@Column("desc")
@ApiModelProperty(value = "备注")
private String desc;
@Column("val")
private String val;
}
`
`
public interface WebsetRepository extends ReactiveCrudRepository<Webset, String> {
}
`
`
@Resource
WebsetRepository websetRepository;
@Test
void t3(){
Webset isOpenFeeds = websetRepository.findById("is_open_feeds").block();
System.out.println(isOpenFeeds);
}
`
println result
Webset(key=null, desc=信息流刷新开关, val=1)
BarracudaX commented
Maybe backticks around the key string is the cause?