Middlegen works really well. For you to use Middlegen out of the box, you need to change the mess with build.properties and/or build.xml file so that it points to your database. In build.xml you should see this <!ENTITY database SYSTEM "file:./config/database/hsqldb.xml"> (http://boss.bekk.no/boss/middlegen/getstarted/index.html). Change that to point to mysql.xml then go and either adjust mysql.xml or your build.properties file to set server/db/user/password. Also, change the project name in the build.xml file. FYI, the middlegen plugin only creates the hibernate config files. If you want java files, you either have to create your own velocity template or better yet, use Hibernates sql2java routine. I created my own velocity template that uses the middlegen Java plugin http://boss.bekk.no/boss/middlegen/plugins/java.html to create java with xdoclet tags.
Hope that helps. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ray Tayek Sent: Thursday, March 04, 2004 10:04 PM To: [EMAIL PROTECTED] Subject: [Middlegen-user] Reverse from an existing database 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
