• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TypedQuery error

 
Nikola Kujaca
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I am writing my first project using hibernate and, as usual, I ran into a problem that I do not seem to be able to find a solution...
Here is the short version. I use Eclipse, and this specific part is supposed to check whether requested user is in the database. Oh, and the database is MySQL...

I have this code:

And this is the Console response:
Hibernate: select TOP(?) korisnik0_.KorisnikID as KorisnikID11_, korisnik0_.agencija_AgencijaID as agencija8_11_, korisnik0_.ime as ime11_, korisnik0_.isActive as isActive11_, korisnik0_.kontakt as kontakt11_, korisnik0_.korisnickoIme as korisnic5_11_, korisnik0_.lozinka as lozinka11_, korisnik0_.prezime as prezime11_, korisnik0_.rola_RolaID as rola9_11_ from Korisnik korisnik0_ where korisnik0_.korisnickoIme=? and korisnik0_.lozinka=? and korisnik0_.isActive=1
Jun 28, 2013 12:47:23 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 1064, SQLState: 42000
Jun 28, 2013 12:47:23 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.KorisnikID as KorisnikID11_, korisnik0_.agencija_AgencijaID as agencija8_11_, k' at line 1

32


If anyone has any suggestions or questions, I would appreciate it.

Thank you all.
N*
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic