首页 > 解决方案 > 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.

标签: javasqlspring

解决方案


推荐阅读