-->
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.  [ 11 posts ] 
Author Message
 Post subject: Hibernate3.0 tools
PostPosted: Wed Apr 20, 2005 9:34 am 
Newbie

Joined: Wed Dec 22, 2004 4:25 pm
Posts: 5
Can I get an update on the status of the Hibernate3.0 plugin tools for Eclipse?

The documentation mentions that there are going to be
significant changes to the built-in velocity templates in
one of the next major releases of the tool set.

Are the updated templates available?

We are getting ready to launch a fairly large project and
have decided to standardize on Hibernate3 with the integrated
tool set for Eclipse. We know that it is still in alpha but will make
adjustments as the releases are made. We need to make a
decision as to writing our templates or waiting for the updated
templates. Obviously we would rather wait for the standard set of
templates that ship with the product.

Also, can you point me to the source code for the tool set.
I am looking specifically for Cfg2JavaTool and the Cfg2HbmTool classes.
The jar is pointing to org\hibernate\tool\hbm2x but I cannot find
that in the source.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 9:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Its a work in progress, but we are heading up for doing a new release soon (probably primo/medio may)

The velocity templates that I refer to in the docs is mostly the java template which I wish to partition/modularize so its more easy to customize parts of the generation instead of copypasting the whole template. This has not been done yet.

If your wish for changing the templates has something to do with what you consider a bug then please report it in our jira - thank you.

The source code is in hibernateext - see http://www.hibernate.org/268.html for details.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 12:04 pm 
Newbie

Joined: Wed Dec 22, 2004 4:25 pm
Posts: 5
Thanks for your quick response Max.

No bugs, just looking to build a set of DAOs for each object and
modularize the javaclass.vm.

Will the process execute and transform any .vm file in the directory?

Can the template directory exist anywhere?

For a test, I have made a couple minor changes to the javaclass.vm
file but the changes are not reflected in the objects that are created.
The .vm directory is within my src directory structure.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 12:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the directory can be anywhere yes.

but it should reflect the directory names too.

so it should be like pojo/java.vm.

if you go to cvs you will see a dao/daohome.vm that might be inspirational...

contributions that make the configuration of this more streamlined is very welcome ,)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Custom Templates
PostPosted: Wed Aug 17, 2005 9:23 pm 
Regular
Regular

Joined: Mon Nov 03, 2003 6:10 am
Posts: 75
I have been playing around with the Eclipse plugin for the Tools and am especially interested in the templating. I tried to specify a template via the 'Artifacts' wizard, but the dialog asked for a 'destination directory'? When I expected to pick a template.

Is the the correct way to use the templates? For instance I want to generate an xxxDAO interface and xxxDAOHibernate Implmentation class. Would I just pick the /dao template directory which contains my DAO.vm and DAOHibernate.vm templates?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 2:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
probably just a typo in the dialog ;(

The directory you choose should have the same layout as the current templates - the best way to see that is to look in the hibernate-tools.jar archive where you can see directories like pojo, dao etc.

so, eg. if you want to change how pure java (pojo) is generated then
you need to have a pojo/javaclass.vm in your template directory.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Missing the boat?
PostPosted: Thu Aug 18, 2005 1:07 pm 
Regular
Regular

Joined: Mon Nov 03, 2003 6:10 am
Posts: 75
Not sure if I am missing the obvious... but I still don't see how to have it generate the dao's. The artifact tool only does the mapping files (xml) and the POJO's from what I can see. Is there some option I am not setting?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 3:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what version are you using ?

dao checkbox in eclipse is only in the cvs version.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 3:31 pm 
Regular
Regular

Joined: Mon Nov 03, 2003 6:10 am
Posts: 75
That would do it. I was using the distributed version.

I will check on that.

Thanks


p.s. any chance to port it to IDEA :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 3:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well large part of the code is written for the purpose of being used in both ant and eclipse - thus all the code generation facilities (and some more bits) could easily be ported to IDEA if someone steps up and do it ;)

but i dont expect all the IDE features that require very specific IDE dependent models will be ported easily...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 3:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
btw. i would rather spend time on make a standalone RCP version that is much more lightweight...making it accessible from any IDE/app

_________________
Max
Don't forget to rate


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