This week's book giveaway is in the Design forum.
We're giving away four copies of Mastering Non-Functional Requirements and have Sameer Paradkar on-line!
See this thread for details.
Win a copy of Mastering Non-Functional Requirements this week in the Design forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

no persistent classes found for query class  RSS feed

 
ashwin bala
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.I tried one hibernate example with annotations. I tried to retrieve data from a table. The name of the table is MstEngineDetails. The primary key in the table is EngineCode and also have a column called ID in the same table.But iam using EngineCode as id reference.

I get a warning message as " no persistent classes found for query class: from com.EngineDetails ".Apart from the warning, my list from the data base is zero(println statement).

I will put my code . Please let me if you can find some errors in the code. Thanks in advance.

my bean class:



My DAO:


 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it defined as a mapping class in your hibernate.cfg.xml?
 
ashwin bala
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you were right Mr.Bill . I thought if we are using annotations we need not mention it. Thanks for your help.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!