-->
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.  [ 5 posts ] 
Author Message
 Post subject: Custom Template Hibernate Tools Problems
PostPosted: Tue Jan 17, 2006 10:42 am 
Newbie

Joined: Thu Jan 12, 2006 9:41 am
Posts: 15
Location: France
Hi!

I use custom templates to generate DAO code but it doesn't work.
In fact, I placed my own .vm files in a directory and named the directory in the wizard dialog like this:
/templates/dao/daohome.vm for .DAOHibernate (implementations of DAOs )
/templates/dao/daocode.vm for .DAO (interfaces)
Indeed, I used the same layout of templates found in the hibernate-tools.jar in the org.hibernate.eclipse.plugin directory (but in the hibernate-tools, I can't find the templates to generate DAO interfaces so I created my own .vm for that named daocode...).
And nothing happens...

Tools:
- Eclipse 3.1.1
- plugin Hibernate Tools 3.1.0.beta2

Thanks.

Tim


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 4:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
are you saying it does not pick up your daohome.vm file ? it should.

daocode.vm i don't know what is, so i don't think it will pick that up.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 11:35 am 
Newbie

Joined: Thu Jan 12, 2006 9:41 am
Posts: 15
Location: France
yep, it doesn't pick up my daohome.vm file. It generates nothing :'(
I don't understand.

I change the daohome.vm of hibernate tools to generate my own DAO CRUD.
Daocode.vm is my own template that I created to generate DAO interfaces.

What should I do?

Tim


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 7:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
See http://www.hibernate.org/hib_docs/tools/ant/index.html
and the hbmtemplate sub-task.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 8:38 am 
Newbie

Joined: Thu Jan 12, 2006 9:41 am
Posts: 15
Location: France
Thanks David!

I wrote an ant task for hibernate tools including the <hbmtemplate> and that works well!

I will to try to generate the basics unit tests with that tool.

Tim


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.