xiaoyu0825@163.com 2022-07-10 00:30 采纳率: 0%
浏览 53
已结题

用JPA 原生sql 查询 找不到继承父类的create_by字段

[求解决]用JPA 原生sql 查询 找不到继承父类的create_by字段

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL **[select g.id,g.name,g.type,g.language,g.age,g.price,g.score,g.introduction,g.manufacturer,g.download_link as downloadLink from game_information g where g.name like concat('%',?,'%') and g.age = ? order by g.update_on desc ]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query] with root cause
_
java.sql.SQLException: Column 'create_by' not found._

img

父类对象

img

  • 写回答

1条回答 默认 最新

  • new一个对象_ 2022-07-10 23:59
    关注

    没有找到要查询的字段,检查字段名称是否写错或者查询与表中字段不一致

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 7月12日
  • 修改了问题 7月12日
  • 创建了问题 7月10日