-->
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.  [ 3 posts ] 
Author Message
 Post subject: [Announce] New hibernate source code generator tool
PostPosted: Wed Dec 19, 2007 3:47 am 
Newbie

Joined: Tue Dec 18, 2007 2:06 pm
Posts: 9
I'm hereby announcing the immediate availability of "Hibernate Pojo Generator", a source code generator tool. This is similar to Joe Hudson's "Hibernate synchronizer" except:

- It generates code with hibernate annotations instead of .hbm.xml files
- It supports multiple schemas, enumerations, natural keys, composite keys, join tables, etc
- It creates a JUnit test case for each table
- It creates code for use directly with Spring

This is not (yet) an eclipse plugin since we're currently using it in an automated fashion, i.e., change the db, automatically create jar files of the data layers. If enough interest is elicited, I'll create an eclipse plugin version too.

A lot of work has been done to minimise any effort on the user's part, such as:

- Generated code usually contains no warnings, it's javadoc'd etc
- All the configs are in place (hibernate.xml.cfg, applicationContext.xml), 3rd party jars
- Test cases are written for you including helper classes to pre-populate any table object with random data respecting the underlying types.
- The generator is able to handle pretty complex schemas (compound foreign natural keys anyone?)

Usually, just pointing it a DB results in code ready to be dropped in your application.

At the moment it's been heavily tested on MySQL only (postgres might work too). We'll be working as fast as we can to make sure support is present for the other DBs.


More info is available at: http://sourceforge.net/projects/hibernatepojoge/

Licensed under GPL. Source code will be uploaded hopefully by the time you read this message.

Feedback is appreciated.

P.S. Admins is this the right place for this message or should this go in "Hibernate Tools" instead?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 5:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hibernate tools would more relevant....any comments on why you did not base this on hibernate tools instead of doing yet-another-codegenerator ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 6:11 am 
Newbie

Joined: Tue Dec 18, 2007 2:06 pm
Posts: 9
max wrote:
any comments on why you did not base this on hibernate tools instead of doing yet-another-codegenerator ?


You're right on this, in fact that was the first name I proposed :-)

A little history:

We were used to starting our projects using Joe Hudson's "Hibernate Synchronizer". When we came to start a new project, we became very very frustrated with the fiddling required to get it "just right" (no proper enum support, no inheritance, no annotations, etc). People were just running it once and then forking off their code.

As an exceedingly quick hack ( < 1 day) , I wrote what I thought was a throwaway project: one which worked solely under our schema. The company architects liked what they saw and started adding tiny features and requesting support for more table styles. Well those little features starting adding up and at one point I significantly cleaned up the codebase to make it more production quality.

The company planned to apply my work on all our internal projects and at this point I asked for the source to be released, given that this was a tool others might have found useful. Permission was given; surprisingly, given the security nature of the company I work for. The result is for all to see.

Therefore, yes, I completely agree with you that it would have been nice to integrate it with other existing projects but circumstances dictated otherwise. Nevertheless, this being GPL and all, this will hopefully encourage code sharing. Perhaps some other generator tool will grab ideas/code and we'll have one better system at which point I'd pull the plug on it (or maybe the other way round: I'd be very happy to apply any contributions to my project).


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