Discussion:
[Middlegen-user] Generating relationships
Manjuka Soysa
2002-04-10 00:04:04 UTC
Permalink
Hi,
I just tried using middlegen with MySql. Everythings
smooth with individual tables.
However, I thought middle gen detects foreign key
relationships automatically, and generates CMRs. That
did not happen.
Is there any way to give a hint about foreign keys in
the build.xml, under the <table> element? I could not
find any documentation.
thanks,
manjuka

http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
Steve Knight
2002-04-10 01:05:18 UTC
Permalink
Two things I can think of:

You must have Foreign keys defined for your tables...see MySQL docs or
InnoDB docs for example syntax.
You must be using a fairly recent version of the MM.MySQL driver...I am
using 2.0.11 with no problems.

Steve

----- Original Message -----
From: "Manjuka Soysa" <***@yahoo.com>
To: <middlegen-***@lists.sourceforge.net>
Sent: Tuesday, April 09, 2002 10:03 PM
Subject: [Middlegen-user] Generating relationships
Post by Manjuka Soysa
Hi,
I just tried using middlegen with MySql. Everythings
smooth with individual tables.
However, I thought middle gen detects foreign key
relationships automatically, and generates CMRs. That
did not happen.
Is there any way to give a hint about foreign keys in
the build.xml, under the <table> element? I could not
find any documentation.
thanks,
manjuka
http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Manjuka Soysa
2002-04-10 03:56:15 UTC
Permalink
I am using the latest (CVS) version of middlegen, the
latest mysql server (3.23.49), and mm mysql 2.0.11.
Here is the sql to create the tables - the foreign key
is clearly defined in the wf_task table, process_id
column. However, middlegen does not detect the link.

create table wf_process (
id integer primary key AUTO_INCREMENT,
name varchar(32) not null,
label varchar(50) not null,
created_by varchar(32) not null,
status integer);

create table wf_task (
id integer primary key AUTO_INCREMENT,
process_id integer not null references wf_process(id),

name varchar(32) not null,
booked_by varchar(32),
status integer
);
Post by Steve Knight
You must have Foreign keys defined for your
tables...see MySQL docs or
InnoDB docs for example syntax.
You must be using a fairly recent version of the
MM.MySQL driver...I am
using 2.0.11 with no problems.
Steve
----- Original Message -----
Sent: Tuesday, April 09, 2002 10:03 PM
Subject: [Middlegen-user] Generating relationships
Post by Manjuka Soysa
Hi,
I just tried using middlegen with MySql.
Everythings
Post by Manjuka Soysa
smooth with individual tables.
However, I thought middle gen detects foreign key
relationships automatically, and generates CMRs.
That
Post by Manjuka Soysa
did not happen.
Is there any way to give a hint about foreign keys
in
Post by Manjuka Soysa
the build.xml, under the <table> element? I could
not
Post by Manjuka Soysa
find any documentation.
thanks,
manjuka
http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Steve Knight
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user

http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
Steve Knight
2002-04-10 10:22:19 UTC
Permalink
Here ya go:
http://www.mysql.com/doc/S/E/SEC445.html

Steve


----- Original Message -----
From: "Manjuka Soysa" <***@yahoo.com>
To: <middlegen-***@lists.sourceforge.net>
Sent: Wednesday, April 10, 2002 1:55 AM
Subject: Re: [Middlegen-user] Generating relationships
Post by Manjuka Soysa
I am using the latest (CVS) version of middlegen, the
latest mysql server (3.23.49), and mm mysql 2.0.11.
Here is the sql to create the tables - the foreign key
is clearly defined in the wf_task table, process_id
column. However, middlegen does not detect the link.
create table wf_process (
id integer primary key AUTO_INCREMENT,
name varchar(32) not null,
label varchar(50) not null,
created_by varchar(32) not null,
status integer);
create table wf_task (
id integer primary key AUTO_INCREMENT,
process_id integer not null references wf_process(id),
name varchar(32) not null,
booked_by varchar(32),
status integer
);
Post by Steve Knight
You must have Foreign keys defined for your
tables...see MySQL docs or
InnoDB docs for example syntax.
You must be using a fairly recent version of the
MM.MySQL driver...I am
using 2.0.11 with no problems.
Steve
----- Original Message -----
Sent: Tuesday, April 09, 2002 10:03 PM
Subject: [Middlegen-user] Generating relationships
Post by Manjuka Soysa
Hi,
I just tried using middlegen with MySql.
Everythings
Post by Manjuka Soysa
smooth with individual tables.
However, I thought middle gen detects foreign key
relationships automatically, and generates CMRs.
That
Post by Manjuka Soysa
did not happen.
Is there any way to give a hint about foreign keys
in
Post by Manjuka Soysa
the build.xml, under the <table> element? I could
not
Post by Manjuka Soysa
find any documentation.
thanks,
manjuka
http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Steve Knight
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
a***@netcom.no
2002-04-10 07:43:05 UTC
Permalink
Take a look at the sql scripts (CVS). They'll give you a hint about how
to configure relations properly.

----- Original Message -----
From: "Steve Knight" <***@hotmail.com>
Date: Wednesday, April 10, 2002 5:06 am
Subject: Re: [Middlegen-user] Generating relationships
Post by Steve Knight
You must have Foreign keys defined for your tables...see MySQL
docs or
InnoDB docs for example syntax.
You must be using a fairly recent version of the MM.MySQL
driver...I am
using 2.0.11 with no problems.
Steve
----- Original Message -----
Sent: Tuesday, April 09, 2002 10:03 PM
Subject: [Middlegen-user] Generating relationships
Post by Manjuka Soysa
Hi,
I just tried using middlegen with MySql. Everythings
smooth with individual tables.
However, I thought middle gen detects foreign key
relationships automatically, and generates CMRs. That
did not happen.
Is there any way to give a hint about foreign keys in
the build.xml, under the <table> element? I could not
find any documentation.
thanks,
manjuka
http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
a***@netcom.no
2002-04-10 08:36:19 UTC
Permalink
You have to use the InnoDB table type. The default table type doesn't
support references. See sql script in samples, and refer to
MySQL/InnoDB docs.

Aslak.

----- Original Message -----
From: Manjuka Soysa <***@yahoo.com>
Date: Wednesday, April 10, 2002 7:55 am
Subject: Re: [Middlegen-user] Generating relationships
Post by Manjuka Soysa
I am using the latest (CVS) version of middlegen, the
latest mysql server (3.23.49), and mm mysql 2.0.11.
Here is the sql to create the tables - the foreign key
is clearly defined in the wf_task table, process_id
column. However, middlegen does not detect the link.
create table wf_process (
id integer primary key AUTO_INCREMENT,
name varchar(32) not null,
label varchar(50) not null,
created_by varchar(32) not null,
status integer);
create table wf_task (
id integer primary key AUTO_INCREMENT,
process_id integer not null references wf_process(id),
name varchar(32) not null,
booked_by varchar(32),
status integer
);
Post by Steve Knight
You must have Foreign keys defined for your
tables...see MySQL docs or
InnoDB docs for example syntax.
You must be using a fairly recent version of the
MM.MySQL driver...I am
using 2.0.11 with no problems.
Steve
----- Original Message -----
Sent: Tuesday, April 09, 2002 10:03 PM
Subject: [Middlegen-user] Generating relationships
Post by Manjuka Soysa
Hi,
I just tried using middlegen with MySql.
Everythings
Post by Manjuka Soysa
smooth with individual tables.
However, I thought middle gen detects foreign key
relationships automatically, and generates CMRs.
That
Post by Manjuka Soysa
did not happen.
Is there any way to give a hint about foreign keys
in
Post by Manjuka Soysa
the build.xml, under the <table> element? I could
not
Post by Manjuka Soysa
find any documentation.
thanks,
manjuka
http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Steve Knight
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
http://www.sold.com.au - SOLD.com.au Auctions
- 1,000s of Bargains!
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...