• 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: Creating Relationships - BOGUS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EO: Creating Relationships - BOGUS?


  • Subject: Re: EO: Creating Relationships - BOGUS?
  • From: Arturo PĂ©rez <email@hidden>
  • Date: Fri, 1 Aug 2003 22:56:19 -0400

On Friday, August 1, 2003, at 10:13  PM, Goodbye Bill wrote:

Okay, maybe I'm missing something, but NOW that I see how to use the GUI of
EOModeler to create many-to-many relationships, that got me thinking...


How the heck is one supposed to create ONE-to-many relationships?

Up until this past weekend, I've been manually populating ALL of my primary
and foreign keys in my code. I stopped doing this once I received a smack
upside the head, from the group, a few days ago. Now, I let EO handle all
of my keys directly... just use the "join many-to-many" function and PRESTO!



Well, EOM handles many-to-many joins itself but don't you still have to specify
the primary key of your entities?


I don't see any way to get EOM to create all of your primary and foreign keys.
I've always specified my own primary keys and foreign keys in EOM. Or rather,
I always put in my own key attributes and set up the relationships. EOM can
then figure out which are foreign keys, etc.


But in the Java code you don't need to worry about that.  All you do is
	eo1.addObjectToBothSidesOfRelationshipWithKey(eo2, "key");

So, the scenario is
	1. Create entity Album with attribute PK, Name.
	2. Create entity Song with attributes PK, Name, AlbumFK
	3. Add relationship toSongs to Album.  You'll see in the Inspector
		where you specify what attributes to join against.  You can
		then turn off (via the black diamonds) those PK & FK attributes.
	4. When you add the relationship toSongs the Inspector will come up
		and you specify whether it's toOne toMany etc etc etc.


------- WebObjects in Philadelphia. You want a cheesesteak with that? _______________________________________________ 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.

References: 
 >EO: Creating Relationships - BOGUS? (From: Goodbye Bill <email@hidden>)

  • Prev by Date: Re: Shell script, anyone?
  • Next by Date: Re: EO: Creating Relationships - BOGUS?
  • Previous by thread: EO: Creating Relationships - BOGUS?
  • Next by thread: Re: EO: Creating Relationships - BOGUS?
  • Index(es):
    • Date
    • Thread