XML mapping future

Hi,

according to Hibernate’s JavaDoc, StackOverflow comments by Vlad as well as e-mails and Wiki pages by Steve, hbm.xml is/will be deprecated and will be replaced by some sort of “extended JPA orm.xml” mapping in Hibernate 7.

We would like to use Hibernate’s “extended JPA” XML mapping, but we have three main worries about the whole process:

  • Information on JPA’s orm.xml mapping on the web is generally scarce, which leads me to the assumption that only few people are using it? Hibernate is also driving users away from XML towards annotations in forum comments, e-mails and its documentation. So I wonder whether “JPA XML for Hibernate” is really future proof or will it be “dead on arrival”?
  • Will “extended JPA XML for Hibernate” really catch up with the features that hbm.xml and annotations have to offer? What about auto scanning for *-orm.xml files (works for *.hbm.xml)? What about <natural-id>? What about @NaturalIdCache (which was obviously never implemented for HBM?)? What about <cache>?
  • And, of course, a rough estimate on when we can expect full “extended JPA XML” support would be greatly appreciated…

Looking forward to hearing from you! :slight_smile:

Best regards, winne

I don’t thing HBM will disappear anytime sooner than 7.0, so they are still going to be supported in 6.0 which is to be released this year.

We are going to consider the community opinions to make sure the new mechanism is going to be even more powerful than HBM.

We use hbm.xml mappings in our hibernate-4 based products. We are migrating these products to hibernate-5. We cannot use annotations for some reasons. We find that some features on jpa are only available on orm.xml like . But there are more features, which are hibernate specific, on hbm.xml are totally missed on orm.xml. We have used hibernate since its 3.x version, when hibernate started to support jpa. We find that hibernate did not bring new features on jpa back into its hbm.xml. Compare to orm.xml, hbm.xml is much more powerful. We hope this new ‘extended jpa xml’ can really merge the features on both hbm.xml and orm.xml into one.

Best regards,
Rice