facebook

hibernate templates

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #266244 Reply

    There’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

    #266304 Reply

    Riyad Kalla
    Member

    Benjamin,
    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…”)

    #266367 Reply

    Sorry, 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

    #266380 Reply

    Brian Fernandes
    Moderator

    Benjamin,

    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.html

    A 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.

    #266593 Reply

    jvergara
    Member

    I’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

    #266678 Reply

    Brian Fernandes
    Moderator

    jverg,

    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.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: hibernate templates

You must be logged in to post in the forum log in