Re: Many To Many relationship and D2W
Re: Many To Many relationship and D2W
- Subject: Re: Many To Many relationship and D2W
- From: Arturo Pérez <email@hidden>
- Date: Wed, 18 Dec 2002 21:44:17 -0500
On Wednesday, December 18, 2002, at 08:44 PM, Art Isbell wrote:
On Wednesday, December 18, 2002, at 12:25 PM, Smadja Serge wrote:
I'm quiet new to WebObjects (5.2). I have an Oracle database with
some many to many relationships that contain an attribute like say a
quantity. I wanted to use D2W to insert data into my database. D2W
works well for my one to many relationships but each time I want to
insert data ("the quantity") into my "many to many" table, it tries
to generate a primary key for this table and of course it can't
because this table holds the two primary keys from the two main
tables !! Is there a way to still use D2W and insert data with many
to many relationship containing attributes ?
I do this frequently with a different database, but this doesn't
sound like a database-specific problem. It sounds more like an
incorrectly-modeled many-to-many relationship.
I'd like to second this. How EOModel handles many-to-many is one of
the trickier aspects of using it. We used to add a primary key to the
join tables, I'm embarrassed to say, because it was easier to
understand.
As Mr. Isbell says, the best bet is to use the EOModel command to join
the two tables in a many-to-many and then to clean it up the way you
need it to be. Our version of EOModel couldn't generate the proper SQL
for creating the join tables so I don't know how well that works.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.