Also note: I give the foreign keys a unique name in the table fieldname. /)avid
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of David > Nouls > Sent: Friday, August 30, 2002 10:36 AM > To: Middlegen Users Mailing List > Subject: [Middlegen-user] Howto disable CMR ? > > > Hello, > > Is there a way to disable the CMR detection of Middlegen ? > I always get the following error: > > > BUILD FAILED > file:C:/Dev/project/build.xml:204: middlegen.MiddlegenException: There is > more > than one relation between bug and person, but the JDBC driver or database > doesn > 't seem to provide any names for the relationships. It is therefore > impossible f > or Middlegen to determine what foreign keys participate in what > relationships. Y > ou should try a different JDBC driver or reduce the number of relations to > one. > You can also try to explicitly name the relations in the database. > DatabaseMetad > ata.getCrossReference(...).getString("FK_NAME") + returned null! > > > I'm using the MySql driver that is used in the samples. I tried with other > versions > of the driver as well, yet I don't seem to be able to get the relations > working > correctly. > > I don't realy need the CMR stuff anyway, so I don't want to > invest too much > time > in getting them to work. > > Any ideas ? > - I'm using MySQL (latest 3.x release) MAX with InnoDB enabled > - Java 1.3 > - Jboss 3.0.1 with CMP. > > (No i'm not switching to a better database, MySQL is just fine > for what I'm > doing > it is more stable and faster than PostgresSQL). > > The create.sql that I use has the following foreign keys defined: > ALTER TABLE BUG > ADD CONSTRAINT FK_PERSON_BUG_1 > FOREIGN KEY (idAssignedTo) REFERENCES PERSON (idPerson); > > ALTER TABLE BUG > ADD CONSTRAINT FK_PERSON_BUG_8 > FOREIGN KEY (idReportedBy) REFERENCES PERSON (idPerson) > ; > > So, as you can see: i do specify the names of the relations, but these are > not returned > by the JDBC driver. (I know the names stink but my generator makes the > scripts for me, > in de design tool I set the names correctly). > > /)avid > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > middlegen-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/middlegen-user > > ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user
