• 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: Displaying Primary Keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying Primary Keys


  • Subject: Re: Displaying Primary Keys
  • From: Robert Walker <email@hidden>
  • Date: Fri, 26 Dec 2003 13:35:42 -0500

Drew,

Take a look at the EOUtilities.primaryKeyForObject() method in the com.webobjects.eoaccess package.

This convenience method returns a dictionary containing the entire primary key for the object. So if your primary key is a single attribute named "oid" then get the value from the dictionary by calling objectForKey("oid").

On Dec 26, 2003, at 8:54 AM, Drew Thoeni wrote:

public void newbieProblem() {
I read (and have found) that if I want to properly used object references between enterprise objects that I must not include the primary key in the class (i.e., I click the diamond off in EO Modeler). However, there are times I want to display the primary key. For example, in administration pages, I like to display the userID. Or when editing code tables, the primary key would be useful to display.
}


public Answer newbieQuestion() {
What is the proper way to do this? Any references out there you suggest.
}
_______________________________________________
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.



--
Sincerely,
Robert Walker
_______________________________________________
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: 
 >Displaying Primary Keys (From: Drew Thoeni <email@hidden>)

  • Prev by Date: Re: Displaying Primary Keys
  • Next by Date: Re: Displaying Primary Keys
  • Previous by thread: Re: Displaying Primary Keys
  • Next by thread: RE: Displaying Primary Keys
  • Index(es):
    • Date
    • Thread