Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
"from unexpected" when createQuery

I get a error when I createQuery:

'from' unexpected

enter image description here

My code is below:

    @Override
    public Admin findByAdmin(Admin admin) {

        return (Admin) sessionFactory.getCurrentSession().
                createQuery("from Admin where admin_name=? and pwd=?").
                setParameter(0, admin.getAdminName()).
                setParameter(1, admin.getAdminPwd()).
                uniqueResult();

    }
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

I'm new to this but had the same error. What fixed things was adding the Hibernate facet under Project Structure - Facets.

over 4 years ago · Santiago Trujillo Report

0

To fix this error in intelliJ idea

Right click on Your Project ---> Framework support : check mark on "Hibernate"

Press OK.

over 4 years ago · Santiago Trujillo Report

0

If you can't find Hibernate in your Project Structure settings (File --> Project Structure... --> Facets) then go to File --> Settings --> Plugins and type Hibernate in search field and verify if plugin is added to Intellij. After that you will find it under Facets in your project settings and add support.

In my case this was what helped me.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!