• 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: Should I create primary keys?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EO: Should I create primary keys?


  • Subject: Re: EO: Should I create primary keys?
  • From: Art Isbell <email@hidden>
  • Date: Mon, 28 Jul 2003 16:34:15 -1000

On Monday, July 28, 2003, at 03:38  PM, Goodbye Bill wrote:

Previously, I was creating the "Link" object and then setting a couple of
foreign keys manually. Now, the keys of the "Link" object are not exposed.
I'm assuming I'm supposed to add one object directly to the other and let EO
handle the association. But how?

I may not understand your question, but after you've defined relationships in EOModeler, ask EOModeler to create the Java EO class file. It will include setter and getter methods for all class properties including attributes and relationships. You can invoke the attribute setters and getters and relationship getters in your code, but you shouldn't invoke the relationship setters directly. Instead, you should use add/removeObjectsTo/FromBothSidesOfRelationshipWithKey() which will do what the method name says instead of just setting one side of the relationship.


Likewise, you can bind dynamic elements to the attribute keys, but not to the relationship keys unless you use the WOToOne/ManyRelationship elements. If you use a WOPopUpButton, for example, you'd need to bind its "selection" key to a method that invokes add/removeObjectsTo/FromBothSidesOfRelationshipWithKey().

Aloha,
Art
_______________________________________________
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: 
 >Re: EO: Should I create primary keys? (From: Goodbye Bill <email@hidden>)

  • Prev by Date: Xcode and webobjects 5.2
  • Next by Date: Re: Xcode and webobjects 5.2
  • Previous by thread: Re: EO: Should I create primary keys?
  • Next by thread: Re: EO: Should I create primary keys?
  • Index(es):
    • Date
    • Thread