a***@netcom.no
2002-05-08 14:09:09 UTC
(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.
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.