I want to execute the below query in Hibernate?
select count(*) from login where emailid='something' and password='something'
I want to execute the below query in Hibernate?
select count(*) from login where emailid='something' and password='something'
Suppose your
login
table is mapped by aLoginClass
class, withemailid
andpassword
instance variables. Then you'll execute something like:It should return in
count
the result you're looking for. You just have to adapt the name to your class and your parameter names.