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.

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

.eivind

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?
>
> Any pointers will be appreciated.
>
> Thanks
>
>
>
> -------------------------------------------------------
> 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_id=1470&alloc_id=3638&op=click
> _______________________________________________
> middlegen-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
>


-------------------------------------------------------
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_id=1470&alloc_id=3638&op=click
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to