• 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
Caching problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Caching problem?
      • From: Jonathan Rochkind <email@hidden>
References: 
 >Re: Shopping Cart - similar issue (From: David Griffith <email@hidden>)

  • Prev by Date: Re: Shopping Cart - similar issue
  • Next by Date: Re: Caching problem?
  • Previous by thread: Re: Shopping Cart - similar issue
  • Next by thread: Re: Caching problem?
  • Index(es):
    • Date
    • Thread