• 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
fetchAllEntities() only returns saved eo?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fetchAllEntities() only returns saved eo?


  • Subject: fetchAllEntities() only returns saved eo?
  • From: Yung-Luen Lan <email@hidden>
  • Date: Sun, 2 Aug 2009 18:12:14 +0800

Hi,

I'm implementing a back-end of a e-commerce system, which do CRUD on product records.

To return a list of products, I wrote:

        return Product.fetchAllProducts(ec);

To add a new product, I wrote:

        Product p = new Product();
        ec.insertObject(p); // the same ec as in Product.fetchAllProducts(ec)
        p.setTitle("New Item");
        return null;

Since I don't want the newly created product object be exposed to customer––especially when the price value is default value zero, I don't save the ec immediately. Instead, I have a save and cancel button to commit the product information.

However, when I add a new product, it's not shown in Product.fetchAllProducts(ec). How can I get all the product objects in an ec nevertheless it has been saved or not? Thanks.

Regards,
yllan
 _______________________________________________
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: fetchAllEntities() only returns saved eo?
      • From: Andrew Lindesay <email@hidden>
  • Prev by Date: Re: [OT] Really quick WebObjects-Cocoa Touch crossover question
  • Next by Date: Re: CalDAV and WebCalendars
  • Previous by thread: Re: [OT] Really quick WebObjects-Cocoa Touch crossover question
  • Next by thread: Re: fetchAllEntities() only returns saved eo?
  • Index(es):
    • Date
    • Thread