实体类中属性名需要与字段保持一致,否则查询不到对应字段的数据。
但可以在查询语句中使用别名的方法获得数据,例如,字段为name,但实体类中的对应的属性确实name123,那么可以在查询时做别名操作:
就是这样子了。