I’m using the following code to get all ClassMetaData from the sessionFactory.
...
Map allClassMetadata = getSessionFactory().getAllClassMetadata();
Set<String> entityNames = allClassMetadata.keySet();
for(String entityName : entityNames) {
ClassMetadata classMetaData = (ClassMetadata)allClassMetadata.get(entityName);
Class entityClass =
}
...
Is it possible to retrieve the according java class. I’ve seen the method getMappedClass(EntityMode mode). But what does entitymode mean ?
You are right, put
getEntityMode( EntityMode.POJO ). There are a few Entity modes that can be used to mapping to things other than POJOs such as XML or Maps.