• 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: Question about fetching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about fetching


  • Subject: Re: Question about fetching
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 21 Jul 2009 06:58:13 -0700


On Jul 21, 2009, at 12:56 AM, Francesco Romano wrote:

Hi..
This is a simple (and maybe stupid) question.

No. :-)


I'm doing an application (an e-commerce application.. maybe wo is not the best choice, but I know java better than ruby..), and I've some pages accessed with directaction.
Maybe I'm wrong, but I can pass values to a page only with the url, so.. only strings.
In a page I select an EntityObject and I've to pass to the other page.
If I can't pass the whole object, I would like to pass the primary key, so fetching should be faster..
But.. I can get the key, but I can't fetch an Object with it's PK.

Yes, you can. See the EOUtilities class in the EOAccess package: http://developer.apple.com/documentation/MacOSXServer/Reference/WO54_Reference/com/webobjects/eoaccess/EOUtilities.html#faultWithPrimaryKeyValue(com.webobjects.eocontrol.EOEditingContext, java.lang.String, java.lang.Object)

public static EOEnterpriseObject faultWithPrimaryKeyValue(EOEditingContext ec, String entityName, Object value)
Fetches the Enterprise Object identified by the specified primary key value



Now i pass a name (a description string..).. but it's not unique, so even with low probability, there can be collisions..

What can I do?


If the PK is the only unique value, you have to use it or create some other unique value.


Chuck

--
Chuck Hill             Senior Consultant / VP Development

Learn WO at WOWODC'09 East in Montréal this August!
http://www.wocommunity.org/wowodc09/east

http://arstechnica.com/apple/news/2009/07/webobjects-sliced-from-106but-prognosis-of-death-premature.ars

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Question about fetching (From: Francesco Romano <email@hidden>)

  • Prev by Date: Re: Question about fetching
  • Next by Date: Re: Are Properties re-read after a scheduled re-start?
  • Previous by thread: Re: Question about fetching
  • Next by thread: Are Properties re-read after a scheduled re-start?
  • Index(es):
    • Date
    • Thread