Steve, I feel your pain. I spent quite a bit of time on it before I was able to succesfully use the airline sample. There were a couple changes I had to make to get it working (more like compromises, actually): 1. Be sure to use fkcmp="false" setting in your build.xml 2. You now cannot use composite primary keys (where columns are part of both the primary and foreign keys). So only RESERVATION_ID column is now part of the primary key. 3. You need to allow your foreign key columns to be NULL-able. It looks like they are inserted as NULL and then later updated with appropriate values.
After you make these changes you should be good to go. Also, (I mentioned this in another post), be sure to delete airline-prefs.properties file in samples/src directory. Looks like every time you run MiddleGen gui, it saves it's settings in that file. If you change the sql file and re-create the tables, it will still try to use those old settings and will fail to compile everything. Delete the file before you re-run MiddleGen after making schema changes. BTW, I was using Oracle, but can't imagine that this wouldn't work for MySQL as well. I've done so many changes that I might have forgotten to mention something. Let me know if this works. Y. -----Original Message----- From: Steve [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 3:12 PM To: [EMAIL PROTECTED] Subject: Re: [Middlegen-user] cmp/cmr with jboss Do you recall any of the details? I am getting nowhere. It seems that every fix introduces new errors. If I make any changes to the airline table definition, I get an error during the struts compiliation. After I comment out the struts items, I get errors about my beans being incomplete. Even if the airline sample does not work, does anyone have an example that does compile and deploy on JBoss (preferably backed with MySQL) ? I don't mind tweaking files or extra steps if someone knows what they are. Am I beating a dead horse here trying to use middlegen with JBoss at this time? Are efforts under way to support JBoss with MySQL? It seems to be a common configuration. Thanks, Steve ----- Original Message ----- From: "Kristoffer Moe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 12, 2003 9:31 AM Subject: Re: [Middlegen-user] cmp/cmr with jboss > I've also struggled with a similar problem some time ago, and as far as I > can remember, I introduced a workaround by adding a new PK column, which > simply was an numeric id. This, of cource, is only possible if you have > control over the database schema. > > > Kristoffer > > > Hi, > > > > I've read in the archives someone saying to use fkcmp="false" in the > > cmp20 plugin to go around the jboss limitation that doesn't accept a > > field to be both CMP and CMR. (which then results in duplicate column > > names in the create table statements) > > Although, that doesn't work for me, since this removes attributes from > > my beans which are both primary key for that bean and a foreign key. > > > > Is there any other work-around for this? > > Mvh/regards, > > > Kristoffer Moe > Senior Consultant > Elan It ReSource > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > middlegen-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/middlegen-user > ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user
