• Post Reply Bookmark Topic Watch Topic
  • New Topic

HQL SELECT problem  RSS feed

Gökhan Sakalli
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SELECT mynote from Mynote as mynote, Notedescription as notedescription
WHERE mynote.username = :username and mynote.usersurname = :usersurname
and notedescription.username = mynote.username and notedescription.usersurname = mynote.usersurname
and notedescription.isturkish = :isturkish

query.setParameter("username", username);
query.setParameter("usersurname", usersurname);
query.setParameter("isturkish", isturkish);

could not resolve property: username of: com.examples.entity.MyNote

There is PK-FK relationships between these tables. username and usersurname

But i didn't define them on mapping files.

Why do i keep getting this error?

both tables(classes) have username and usersurname columns(properties).

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!