Overriding metadata through XML.1.1. Global level metadata
You can define global level metadata available for all XML files. You must not define these metadata more than once per deployment.
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings
xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
version="1.0">
<persistence-unit-metadata>
<xml-mapping-metadata-complete/>
<persistence-unit-defaults>
<schema>myschema</schema>
<catalog>mycatalog</catalog>
<cascade-persist/>
</persistence-unit-defaults>
</persistence-unit-metadata>
xml-mapping-metadata-complete means that all entity, mapped-superclasses and embeddable metadata should be picked up from XML (ie ignore annotations).
schema / catalog will override all default definitions of schema and catalog in the metadata (both XML and annotations).
cascade-persist means that all associations have PERSIST as a cascade type. We recommend you to not use this feature.