Hi,
I'm using JPA annotations on some interfaces and using the hibernate tools hbm2ddl and hbm2java with a jpaconfiguration to generate my SQL schema and model POJOs.
All is working fine apart from two serious issues with the generated POJOs:
- The generated POJOs are created with the same package name-space and with the same name as my interfaces (which obviously leads to compilation errors)
- The generated POJOs do not inherit from the annotated interfaces.
I originally tried to solve this by looking for some property to set in the hbm2java tag but none seem appropriate for my needs.
I then found some documentation on using the <meta> tag in the hbm.xml mapping files to specify which interfaces the generated POJOs should implement. However as I do not use hbm.xml mapping files this isn't an option for me. Is there a way to achieve the same thing using hibernate annotations? (I had a look but could not find anything)
The only other thing I've read about that might provide a solution for me is customizing an *.ftl file.
Could some knowledgeable person tell me if the *.flt route is the right one for my needs or is there a simpler way to alter the behaviour of the hbm2java tool that I have not come across yet.
Many thanks in advance,
Tim