Caching problem?
Caching problem?
- Subject: Caching problem?
- From: David Griffith <email@hidden>
- Date: Tue, 02 Mar 2004 18:23:37 +0100
Hi,
I'm not so sure how the caching works and I'm wondering if this might be a
caching issue.
I have a Product table with a relationship to ProductPrice called
productPrices. This is basically a many-to-many relationship based on a
Country.
In Product.java is a method called productPrices() which returns an NSArray
of the product prices for this product. Each product price has a link to a
Country also, so I want to filter the productPrices for a certain country.
This works fine with the following:
public ProductPrice getProductPriceForCountry(Country country) {
NSMutableArray productPrices = new NSMutableArray();
productPrices = (NSMutableArray)this.productPrices();
NSMutableArray bindings = new NSMutableArray();
bindings.addObject(country);
EOQualifier countryQualifier =
EOQualifier.qualifierWithQualifierFormat("country = %@", bindings);
EOQualifier.filterArrayWithQualifier(productPrices,countryQualifier);
return (ProductPrice)productPrices.objectAtIndex(0);
}
However, it works for the FIRST time, if I change the country, then the
product prices that I get back from productPrices() only gives me the
filtered country from the previous time, not all the prices.
Could the filter still somehow be active? If so, can I remove it?
Dave.
_______________________________________________
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.