4
For a specific reason, I need to do object-relational mapping (JPA) of my entities with XML.
[Unfortunately,] I cannot use annotations to do this. It turns out that in certain properties, I need to use Hibernate-specific Features. For example, extra Lazy Collections, something I would easily do using Annotations with @Lazycollection(Lazycollectionoption.EXTRA).
The JPA Hibernate documentation says the following:
"If you Wish to use Hibernate specific Features in some entities, you’ll have to either use Annotations or fallback to hbm files. You can of Course mix and match annotated entities and entities describes in hbm files." (http://docs.jboss.org/hibernate/stable/annotations/reference/en/html/xml-overriding.html)
It turns out I have no idea how to use the aforementioned "hbm files" along with my Orm.xml (if that’s what I should do).
Someone knows how to do it?