Re: NSDictionary and FetchSpecificationNamed usage
Re: NSDictionary and FetchSpecificationNamed usage
- Subject: Re: NSDictionary and FetchSpecificationNamed usage
- From: Dev WO <email@hidden>
- Date: Thu, 20 Oct 2005 00:37:32 +0200
In fact I'm not that knowledged on SQL;)
I'll try to stick with something I understand:( (for now;))
so if I do:
EOQualifier qual = EOQualifier.qualifierWithQualifierFormat
("product = aProduct", null);
the array should be only for the item of type aProduct, but the SQL
generated is:
WHERE (1=1)
?!
I'm working on the to-one relationship here in fact, I don't know
what I'm doing wrong:(
Any idea?
Before you run too far...
On Oct 19, 2005, at 2:09 PM, Dev WO wrote:
Assuming you have an order, and a properly defined EOModel,
your several steps are
/* @TypeInfo OrderItem */
NSMutableArray items = order.items();
Done, update your item counts and saveChanges.
I fact I'm starting from a provisioning for a specific product.
So I though about going all the way up from this product and
create an array of item of this product which aren't fully
provisioned order by the order date.
Then affect the stock and order quantity.
But I maybe I should go from the order and finds all the product
of type "product" and then...
I'm not sure it makes that much different.
I still have some "vision" bugs in my head;) it gets better
thought:)
I don't fully understand what you're doing. But if you have a
path from your Provision object to your Item object you can write
a fetchspec that acts something like
Provision.orders.items.quantity = 0
that will get all the Provisions that include unfulfilled items.
I don't think that will work against the database, only in memory.
You can still use it in a qualifier to filter an NSArray in
memory. Pierre Bernard has a number of qualifier extensions that
provide more advanced SQL generation on his page:
http://homepage.mac.com/i_love_my/code.html
I _think_ that ExistsInRelationshipQualifier is what you need.
A big THANKS! to Pierre for all these useful qualifiers. Highly
recommended!
Chuck
--
Coming in 2006 - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/
practical_webobjects
_______________________________________________
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