Up to Hibernate 5 the class mapping can be defined either by using JPA annotations or with an XML file. The XML file is convenient because it isn't tied to the class, which means it's possible to:
Hibernate 6 removed the XML mapping. Is there an alternative method to define a mapping without adding annotations to the persisted classes?
We now recommend the use of the standard JPA ORM mapping format, which is orm.xml
.
For Hibernate-specific extensions to the orm.xml
format you can find mapping-3.1.0.xsd
here:
https://hibernate.org/xsd/orm/mapping/mapping-3.1.0.xsd
I guess this is what you're looking for.