Re: NSDictionary and FetchSpecificationNamed usage
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