Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

org.hibernate.QueryException: Not all named parameters have been set + Use of :id

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am new to hibernate and was trying to one example

bellow is my method to retrive a unique record based on the id given as parameter.

As you can see inId is the input parameter which i am pasing to my method as parameter.



But while executing this method i am getting following error.
Bellow is the complete stack trace


What is the use of :inId

can't i write my query as


Through this also i can pass the dynamic value right ?

Then what is special about :inId ? Is there any other advantage ?

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All right i got it.

I miss to set the value of inId

 
Bhagat Singh Rawat
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jigar Naik wrote:All right i got it.

I miss to set the value of inId




Good catch finally yourself.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!