permaculture playing cards
The moose likes Object Relational Mapping and the fly likes List of entity types registered in hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply locked New topic

List of entity types registered in hibernate

Mahesh Kedari
Ranch Hand

Joined: Nov 28, 2009
Posts: 111
Is it possible to get the list of entity classes registered in hibernate configuration?
My problem is, I am getting Unknown Entity error while doing any operation in hibernate session.
I've ensured that all the process of registering entities is properly done. Also when i give incorrect path of any entity in persistence.xml it
throws an error for that entity saying Class Not Found, which means hibernate is able to locate my entity beans properly.

Also I tried to fetch the class signature with instance.getClass().getName() method which is coming same as that i have mentioned in persistence.xml

Can anyone please help me on this?

Mahesh Kedari - Fidus Technologies Ltd.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Please UseOneThreadPerQuestion. Duplicate of this.

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
I agree. Here's the link:
subject: List of entity types registered in hibernate
It's not a secret anymore!