• 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: NSDictionary and FetchSpecificationNamed usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary and FetchSpecificationNamed usage


  • Subject: Re: NSDictionary and FetchSpecificationNamed usage
  • From: Arturo Perez <email@hidden>
  • Date: Wed, 19 Oct 2005 13:26:10 -0400

Dev WO wrote:
-----
public void provisioningOrder(Product product, ProductProvisioning provisioning) {
CustomerOrderItem aCustomerOrderItem;
NSMutableDictionary theProduct = new NSMutableDictionary();
theProduct = ((NSArray)product.valueForKey("productPK"));
EOFetchSpecification fetchSpec = EOFetchSpecification.fetchSpecificationNamed ("FetchSpecItemSortedByOrderDateForAProductAndRefresh", "CustomerOrderItem");
EOFetchSpecification boundFs = fetchSpec.fetchSpecificationWithQualifierBindings(theProduct);
-----
I just need to fetch the CustomerOrderItem for the specific object product!
My namedFetchSpecification is handling the sorting and some extra qualifier.


Could someone explain me in a human readable language;) what I'm doing wrong? obviously I'm doing something wrong:)

Thanks

Xavier


Well, you shouldn't be using the primary key as one thing.
Another thing is that you're not putting anything into the array.

Try this
         NSDictionary theProduct = new NSDictionary("productPK", product);

Or even
	NSMutableDictionary theProduct = new NSMutableDictionary();
	theProduct.setObjectForKey(product, "paramName");

But really, get rid of the primary key from the object so that you can pass the EO without extracting its primary key first.


_______________________________________________ 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
  • Follow-Ups:
    • Re: NSDictionary and FetchSpecificationNamed usage
      • From: Dev WO <email@hidden>
References: 
 >NSDictionary and FetchSpecificationNamed usage (From: Dev WO <email@hidden>)

  • Prev by Date: Creating an NSArray Key
  • Next by Date: IP & User Agent
  • Previous by thread: NSDictionary and FetchSpecificationNamed usage
  • Next by thread: Re: NSDictionary and FetchSpecificationNamed usage
  • Index(es):
    • Date
    • Thread