• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate for JDBC

 
rakesh Bob
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends please help me out of this problem , When am usiing hibernate in eclipse for JDBC programs am gettin an error like " this method for example setPid() is undefined for the type Products".What should i do???
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to have getter/setter methods for the properties that you have mapped in the hbm files. In this case, i guess you have mapped a property named pid and there is no setPid method in the Products class. Introduce that method in the class
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check your .hbm (mapping file) for Products table whether pid is defined. If it is defined, then check your bean class for setPid() method as latter poster said. you need to have both to fix it.

Still have a problem, post .hbm file and bean class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic