相关疑难解决方法(0)

为什么Hibernate查询在IntelliJ中有编译错误?

我有这个Hibernate代码:

Query q = session.createQuery("from MyTable where status = :status");
Run Code Online (Sandbox Code Playgroud)

它编译和工作正常..

但是在IntelliJ中我报告了这个错误:

无法解析表达式,无法解析符号'MyTable'

为什么IntelliJ会抱怨?

hibernate intellij-idea

18
推荐指数
4
解决办法
2万
查看次数

如何配置IntelliJ HQL控制台以使用Spring Boot

我正在使用Spring Boot和IntelliJ.由于Spring Boot自动配置数据库,因此没有hibernate.cfg.xml文件.通常,当您要在控制台上执行HQL查询时,可以通过此配置文件进行连接.

https://www.jetbrains.com/idea/help/working-with-the-hibernate-console.html#d951572e120

不幸的是,我没有将该文件作为切入点.我还能如何执行HQL查询?

hibernate jpa hql intellij-idea spring-boot

11
推荐指数
1
解决办法
1337
查看次数

标签 统计

hibernate ×2

intellij-idea ×2

hql ×1

jpa ×1

spring-boot ×1