Hi Leander,

No, that didn't help. I still get the same error message.
If I look to the samples of middlegen I see no example where they name
the relations. They never reference the same table more than once.

This is rather stupid that the middlegen task just stops. The foreign
keynames are different so it should be no problem to differentiate the
relations.

The whole joke is ofcourse that I only need CMP and not CMR! I never use
finders
since I can get a speed x3 when I use a DAO approach. EJB QL is a nice idea,
but
needs a few more revision to make it useful for real applications.

I'm also deploying on JBOSS 3.0.1 so that means I can not have foreign keys
that
are part of a relation (every one of them). But I don't want to call into
the
Local object of a relation to just get the id!

/)avid

> -----Original Message-----
> From: M-Leander Reimer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 30, 2002 10:44 AM
> To: David Nouls
> Subject: RE: [Middlegen-user] Howto disable CMR ?
>
>
> Hi David,
>
> I think the problem is that you define your foreign keys with the ALTER
> TABLE style. This does not work work mySql for some reason.
>
> Try to define the foreign keys in the CREATE TABLE definition, as its
> done in the middlegen samples.
>
> Worked for me (and I am using the same configuration as you do :-))
>
> Hope it helps.
>
> Leander
>
>
> Am Fre, 2002-08-30 um 10.47 schrieb David Nouls:
> > 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
> --
> M.-Leander Reimer
> Dipl.-Inf. (FH)
>
> Techdivision
> Kunstm�hlstr. 17
> 83022 Rosenheim
>
> Fon:  (08031) 356 38 32
> Fax:  (08031) 356 38 48
> Mail: [EMAIL PROTECTED]
>
>
>



-------------------------------------------------------
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

Reply via email to