Brian
Brian

Reputation: 7156

Hibernate: How to list all mapped objects?

How can I inspect at run time what Hibernate has setup for object mappings?

I have a mapping that is not generating any errors,it is in the hibernate config, but yet it is not being found. I want to inspect the mappings to verify that it is there and also check for typos.

Upvotes: 1

Views: 1122

Answers (1)

JB Nizet
JB Nizet

Reputation: 692281

You can get the metadata of all the entities using SessionFactory.getAllClassMetadata().

Upvotes: 4

Related Questions