jpa SQL Error: 17006, SQLState: null

could not read column value from result set: ID; 列名无效

 

查询语句:

String sql = "select A.SOURCE_CODE from  TB_PROSPECT_SOURCES A where Lower(A.SOURCE_CODE) = Lower('"+code+"')";
  Query query = this.getEntityManager().createNativeQuery(sql);
  List l = new ArrayList();
  l.add(query.getResultList());

将sql表的指段写全,或者 select * ,错误消失

相关文章:

  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案