Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

295
Visualizações
"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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda