aspose file tools*
The moose likes Object Relational Mapping and the fly likes no persistent classes found for query class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "no persistent classes found for query class" Watch "no persistent classes found for query class" New topic
Author

no persistent classes found for query class

ashwin bala
Ranch Hand

Joined: Dec 07, 2009
Posts: 38
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

Joined: Mar 07, 2010
Posts: 1666
    
    7

Is it defined as a mapping class in your hibernate.cfg.xml?


[How To Ask Questions][Read before you PM me]
ashwin bala
Ranch Hand

Joined: Dec 07, 2009
Posts: 38
you were right Mr.Bill . I thought if we are using annotations we need not mention it. Thanks for your help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: no persistent classes found for query class