- This topic has 5 replies, 4 voices, and was last updated 17 years, 8 months ago by Brian Fernandes.
-
AuthorPosts
-
Benjamin RanckMemberThere’s been some mention of hibernate templates based on velocity. Can anyone tell me exactly where they are and if it’s possible to modify them. There are a few niggling issues with the default ones that I’d love to modify.
Also there’s a very nice pattern on hibernate’s site, http://www.hibernate.org/328.html
for a JDK1.5 DAO with generics.Thanks,
Benjamin
Riyad KallaMemberBenjamin,
Which templates are you referring to specifically? (e.g. “When I do XYZ, I get ABC files, I want those templates to be a bit different…”)
Benjamin RanckMemberSorry, when I’m reverse engineering a database to create the pojo’s and DAOs as well as the hbm mapping. The DAOs in particular.
Thanks,
Benjamin
Brian FernandesModeratorBenjamin,
Have a look at section 5.5 in the following document which explains how the templates can be used.
http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/hibernate/index.htmlA copy of this document is also included with the Eclipse help system in your MyEclipse installation.
Hope this helps, let us know if you require further assistance.
jvergaraMemberI’ve got a similar problem. I want to change the spring Dao (classes than extends HibernateDaoSupport), aditionally where is the applicationContext Template thah is used to map the generated Dao classes ??
Another question… it’s posible to change the pojo template to override equals and hashCode methos ??
I want to use the EqualsBuildes from apache (like hbm2java task).Thanks
Brian FernandesModeratorjverg,
To change the spring dao, you would need to change the daohome.vm file, which you can find in the template zip. (See above link for instructions).
There is no template for the bean generation in appliationContext.xml, that is done programmatically.It should be possible to change the pojo template, but I’m not too familiar with the EqualsBuildes method to provide further assistance.
-
AuthorPosts