Definition of a new domain model mapping XSD combining features from both JPA’s orm.xml and Hibernate’s hbm.xml formats under the https://www.hibernate.org/xsd/orm/mapping namespace. The overall format is based on the JPA orm.xml XSD with the Hibernate features “woven” in. This has a number of benefits.
For the user, this allows extending the concept of “XML overriding” to support Hibernate-specific features.
For the project, this means supporting one JAXB model, one set of validations, etc.
Use of the hbm.xml schema has been discouraged for quite some time, but we have been waiting for this work to “deprecate it”. As of 6.1, hbm.xml is now considered deprecated officially. Another aspect to the work here has been the development of a converter from hbm.xml to this new maping.xml schema. At the moment, this is only supported on-the-fly (see org.hibernate.cfg.AvailableSettings#TRANSFORM_HBM_XML_FEATURE_HANDLING). Follow up versions will also bring tooling options for the transformation as well.
As of the 6.1.0 release, this is an incubating feature. The schema and JAXB models are defined. Consuming these documents work. But small things may need to change still, especially with regard to te transformations.
Definition of a new domain model mapping XSD combining features from both JPA’s
orm.xml
and Hibernate’shbm.xml
formats under thehttps://www.hibernate.org/xsd/orm/mapping
namespace. The overall format is based on the JPAorm.xml
XSD with the Hibernate features “woven” in. This has a number of benefits.For the user, this allows extending the concept of “XML overriding” to support Hibernate-specific features.
For the project, this means supporting one JAXB model, one set of validations, etc.
Use of the
hbm.xml
schema has been discouraged for quite some time, but we have been waiting for this work to “deprecate it”. As of 6.1,hbm.xml
is now considered deprecated officially. Another aspect to the work here has been the development of a converter fromhbm.xml
to this newmaping.xml
schema. At the moment, this is only supported on-the-fly (seeorg.hibernate.cfg.AvailableSettings#TRANSFORM_HBM_XML_FEATURE_HANDLING
). Follow up versions will also bring tooling options for the transformation as well.As of the 6.1.0 release, this is an incubating feature. The schema and JAXB models are defined. Consuming these documents work. But small things may need to change still, especially with regard to te transformations.