-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Use custom template for generating hbm.xml files
PostPosted: Sun Jan 29, 2006 3:14 pm 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
Is it possible to use a custom template when generating hbm.xml files from a database using Middlegen?

The /middlegen/plugins/hibernate/hibernate.vm template in middlegen-hibernate-plugin-2.1.jar contains a reference to "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd".

When I run hbm2java using org.hibernate.tool.ant.HibernateToolTask I get a warning:

[hibernatetool] (util.DTDEntityResolver 51 ) Don't use old DTDs, read the Hibernate 3.x Migration Guide!

This is reason I want to use my own template where I can update the reference to the dtd.

see http://www.hibernate.org/250.html#A21


-Kaj :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 29, 2006 3:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
all of middlegens templates can be modified as you find necessary.

p.s. have you tried hibernate-tools ? :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 29, 2006 9:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Just in case you did not want to / or cannot go the hibernate tools. I did make a number of changes to Middlegen including allowing it to generate H3 output. Use the version attributes in your build task. There has not been a release (I should do one) as yes so use the CVS version.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 4:46 am 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
david wrote:
Just in case you did not want to / or cannot go the hibernate tools. I did make a number of changes to Middlegen including allowing it to generate H3 output. Use the version attributes in your build task. There has not been a release (I should do one) as yes so use the CVS version.


Hi!

Thank you both for ansering and for making it possible to generate H3 output from Middlegen!

I havn't yet started to use the hibernate tools for generating hbm.xml files, so at the moment I use my old middlegen ant build-file for generating these files.

I'm looking into using the hibernate tools for this job.


-Kaj :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.