Hibernate mapping files used with MD4J must satisfy a set of requirements:
MD4J looks out for metadata in your input files (see metadata reference) and uses that to customize it's output based on your directions.
Using MD4J metadata in Hibernate mappings is rather straightforward, for example you can use
the md4j:render-as-image
flag to render a property as an img
tag
in JSP (or whatnot) views:
<property name="logo" type="string" not-null="false"> <meta attribute="md4j:render-as-image">true</meta> </property>