java - How to make query operation works
问题描述
I have this line of code and cant figure out why it doesnt work:
Query<Instructor> theQuery = currentSession.createQuery("from Instructor", Instructor.class);
Error is: Can't resolve symbol 'Instructor'
Instructor is just one entity simple class. If you need more code or something, Im here.
I know what this error mean but how to fix it? I have entity class Instructor, table instructor, everything is fine.
Also tried with
String hql = "from Instructor";
but same error.
解决方案
推荐阅读
- html - 有没有办法设置表单属性输入标签来让谷歌高级搜索在没有 JS 的情况下工作
- java - 如何更新 Firestore 文档哪些字段是字符串和整数的混合?
- angular - 更改主要内容的 Angular 6+ 侧边菜单
- java - 部署 jar 文件时 Apache Geode 关闭
- angular - “订阅”类型的参数不能分配给“字符串”类型的参数。角
- kubernetes - Calico 在我的 k8s 中运行良好,但我无法在节点上 Ping clusterip
- html - 检查 padding-top: env (safe-area-inset-top);
- performance - 寻找使用 MATLAB 计算矩阵的更快方法
- multithreading - Perl Tcp 传输不一致
- java - 在实现 Spring Security 时,在类路径资源中创建名称为“springSecurityFilterChain”的 bean 时出错