Is it posible to use the Hibernate Gateway with JPA based configuration (persistence.xml instead of hibernate.cfg.xml)?
We do not use hibernate.cfg.xml at all, but it appears that the Hibernate Gateway requires this. If I cannot get by without having a hibernate.cfg.xml, is there a simple way of keeping our current persistence.xml (with class based mapping annotations) and only add the hibernate.cfg.xml as needed (no database connection information, class information, mapping information, etc.)?
It seems like this should be do-able - I've logged a bug for it :
I haven't tried it, but it seems like the persistence.xml file allows you to specify a hibernate.ejb.cfgfile (your hibernate.cfg.xml) - see http://bill.burkecentral.com/2007/07/06/co-existence-with-hibernate-jpa-and-ejb3/ - but it seems like you may still have specify some mapping information in your hibernate.cfg.xml. Does that come any closer to what you are looking for?
I did see the option of specifying the hibernate.cfg.xml in the persistence.xml and thought this could be an option.
My only concern/question is related to mappings. Will I have to create .hbm files for all of my persistent entities (even though the mappings are already in annotations)? I have not seen this documented anywhere and would be a maintenance issue in the long run (have to edit the .hbms whenever we change a mapping annotation).
Agree with the feature request, btw.
Thanks for the help.