There is no getter for property named 'user' in 'class pojo.Order'

今天遇见了这个bug找了半天现在终于找到了

There is no getter for property named 'user' in 'class pojo.Order'

有的时候并不是没有getter方法,而是要检查你的order类中的属性名是否和要映射的数据库表的名字一致

我的数据库中用户表名字叫user所以在order类中的属性也要叫user,我开始叫newuser这是改正过后的,这个错误人有时候容易忽略

There is no getter for property named 'user' in 'class pojo.Order'

这个是改正过后的,输出order对象

There is no getter for property named 'user' in 'class pojo.Order'


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2021-07-04
  • 2021-08-15
猜你喜欢
  • 2022-02-04
  • 2021-10-03
  • 2021-11-03
  • 2021-11-21
  • 2021-10-10
  • 2021-08-27
相关资源
相似解决方案