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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to