Is there any way to retrieve the node name from the mappings of an entity and/or a property if using XML data binding in Hibernate 3? I've got a need to do some specialized XML processing not handled by the standard Hibernte XML binding code, so I need to know what the XML node name is from the mapping file.
I looked in the ClassMetadata interface and found nothing. I found
StandardProperty.getNode()
and
EntityMetamodel.getProperties()
but I found no "official" way to access these classes.
I can get from a session factory to the metadata of an arbitrary entity and retrieve ALMOST everything I need using
Code:
Map metaMap = sessionFactory.getAllClassMetadata();
for (Iterator iter = metaMap.values().iterator(); iter.hasNext();) {
ClassMetadata md = (ClassMetadata) iter.next();
...
} // for
but I can't figure out how to get from a session factory to a StandardProperty (or some other class that contains the XML "node" name). Any ideas?