Bytecode enhancement of any kind is only supported for annotated entities.
I definitely would like to get into supporting XML metadata as well,
although I doubt it would ever be done for HBM mappings.
On Thu, May 12, 2016 at 3:18 AM Gunnar Morling <gunnar(a)hibernate.org> wrote:
As per an answer of Vlad in the forum , the lazy fetch groups new in ORM
5.1 are only supported via annotations.
Is that a temporary solution and XML support for lazy groups is planned
eventually (if not in HBM but then via some means of extension point in
In other words, is our strategy to keep annotations and XML (again, be it
HBM or through extensions in orm.xml) equally powerful? Or are we indeed
considering annotations as the "preferred way" and add new functionality
Personally I'd hope for the former, as there are use cases for both and it
should be left to users which one to take.
Taking a step back, it's not specifically XML I'm attached to, but *some
means* of external configuration of mappings as opposed to internal
configuration via annotations on the model itself. In the No-ORM projects
we provide APIs which allow to apply the same configuration as via
annotations for that purpose. Maybe that'd be a good thing for ORM, too?
hibernate-dev mailing list