Discussion:
[Middlegen-user] many-to-many (and some status about Middlegen's plugins)
a***@netcom.no
2002-05-08 14:09:09 UTC
Permalink
(crossposting to middlegen-devel. please reply to middlegen-user.
middlegen-devel is only for people interested in middlegen's source
code)

Hi! I was about to remove the web-based forums (because I hate them,
and activity there is very low), and I saw Jonathan O'Connor's post
about m-n relations. Here it is again:

---------------------%<-----------------------------
I have some code which detects when there are one to one relations.
Basically, if the foreign key field is also the primary key field for
the foreign table, then we have a 1-1 relationship.

Let me know if you are interested in this code and I'll post it.

Also, I have looked at the many-to-many code, and I don't understand
it :-( But, I think the only time you should generate many-to-many
relations are when T1 to MapTable is many-to-1 and T2 to MapTable is
many-to-1, and (this is the important bit) the two foreign key fields
in MapTable are the only primary key fields in MapTable. I did notice
that middlegen will create a many-to-many from 1-many, many-1 (rather
than many-1, 1-many).

Hope this helps,
Jonathan
---------------------%<-----------------------------

I think the most common way to create a many-to-many relationship is by
using 1-many, many-1.
Jonathan.O'
2002-05-09 14:03:05 UTC
Permalink
Aslak,
I too hate the web based forums. Now if only I could figure out how to
mail directly?

It looks as if you've been doing some great work with MiddleGen in the
last month. I look forward to playing with it when 1.1 comes out.

Ciao,
Jonathan O'Connor
Ph: +353 1 872 3305
Mob: +353 86 824 9736
Fax: +353 1 873 3612




<***@netcom.no>
08.05.2002 16:23


To: ***@users.sourceforge.net, middlegen-***@lists.sourceforge.net
cc: middlegen-***@lists.sourceforge.net
Subject: many-to-many (and some status about Middlegen's plugins)


(crossposting to middlegen-devel. please reply to middlegen-user.
middlegen-devel is only for people interested in middlegen's source
code)

Hi! I was about to remove the web-based forums (because I hate them,
and activity there is very low), and I saw Jonathan O'Connor's post
about m-n relations. Here it is again:

---------------------%<-----------------------------
I have some code which detects when there are one to one relations.
Basically, if the foreign key field is also the primary key field for
the foreign table, then we have a 1-1 relationship.

Let me know if you are interested in this code and I'll post it.

Also, I have looked at the many-to-many code, and I don't understand
it :-( But, I think the only time you should generate many-to-many
relations are when T1 to MapTable is many-to-1 and T2 to MapTable is
many-to-1, and (this is the important bit) the two foreign key fields
in MapTable are the only primary key fields in MapTable. I did notice
that middlegen will create a many-to-many from 1-many, many-1 (rather
than many-1, 1-many).

Hope this helps,
Jonathan
---------------------%<-----------------------------

I think the most common way to create a many-to-many relationship is by
Loading...