RE: Reverse from an existing database

"Ray Tayek" <[email protected]>
Newsgroups gmane.comp.java.ejb.middlegen.user
Message-ID <000501c402ef$8f1f29c0$b4d501cc@STINGRAY>

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf 
> Of Eivind Waaler
> Sent: Friday, March 05, 2004 12:21 AM
> To: [email protected]
> Subject: Re: [Middlegen-user] Reverse from an existing database
> 
> 
> Hi, middlegen will generate the hibernate xml mapping files 
> from your database. Then you can use hibernates hbm2java tool 
> to generate the java files.
> 
> Just set up middlegen to run against your database. The 
> sample build.xml script includes a target to run hbm2java, 
> which depends on the middlegen target.
> 

Done

> So set up your database, package names etc. then simply run 
> 'ant hbm2java' to generate the xml mappings with java files.
> 

I get a can't find the middlegenTask fron ant. Where does it live? And does
it have to be also place in ant/lib (like junit.jar)? (it does not seem to
be in the hib or hib tools jar).\

Sorry abou the possible duplicate post. I thought I posted a reply from home
using pcanywhere and it shows sent in outlooj, but has not shown up yet on
the list.

thanks


> On Thu, 4 Mar 2004, Ray Tayek wrote:
> 
> > Hi, newbie to hibernate (and db's in general) here. we have this 
> > existing mysql database and I am trying to use hibernate to 
> provide a 
> > more rational persistance layer. Towards that end, I would like to 
> > reverse the existing database tables directly into java objects if 
> > possible. According to the diagram at: 
> http://hibernate.org/102.html, 
> > middlegen will do this. I 
> downloaded the sample, but it seems to be 
> > going the other way. Is there any doc around on how to do this?
> >...



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.