• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EO: Object Collections?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EO: Object Collections?


  • Subject: Re: EO: Object Collections?
  • From: Sam Barnum <email@hidden>
  • Date: Mon, 28 Jul 2003 07:52:20 -0700

Open EOModeler, and go to layout view, with the ortho lines.
Highlight the "song" and "genre" boxes, and choose "join in many-to-many relationship" from one of the menus.
This will create a join table for your many-to-many join, and several relationships between the objects, including a flattened relationship from song to genre. Once you assign the column names for your join table, you don't have to think about it much anymore, just use the flattened relationship.


-Sam

On Monday, July 28, 2003, at 04:27 AM, Christopher Pavicich wrote:

Bill:

You need a 3 table to do this; Song, Genre, and X_SONG_GENRE.

The X_SONG_GENRE table should have its own primary key, a foreign key that is the SONG's primary key
and a foreign key that is the GENRE's primary key. Then EOModeler you can put a TO-MANY relationships on
both SONG and GENRE. You should also be able to flatten the relationship (someone check me on this, my EOF is
rusty) between SONG and GENRE. This will allow you to ignore the X_SONG_GENRE table and EO in your code and just do:


Song song;
song.genres();

or

Genre genre;
genre.songs();



--CMP
_______________________________________________
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.

  • Prev by Date: webobjects+openbase on solaris 8
  • Next by Date: Re: Help - my project folder thinks it's a package
  • Previous by thread: Re: EO: Object Collections?
  • Next by thread: Development Deployment
  • Index(es):
    • Date
    • Thread