• 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
Re: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship]


  • Subject: Re: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship]
  • From: Dev WO <email@hidden>
  • Date: Sat, 23 Jul 2005 18:20:52 +0200

mmm, I don't understand very well (it's not coffe on my side, it's more "twisted brain for 48 hours").

-----

    public WOComponent addOrUpdateProductGeneric()

    {

        awakeFromInsertionProductGeneric(ec); //setting the date posted/updated

        if (!productGenericList.containsObject(productGeneric))

        {

            productGeneric.setStockStatus(new Integer(0));

        }

        else

        {

            editMode = false;

        }

        ec.saveChanges();



Replace the code below with something like:

    // We just created a new object and saved it.

    // Reset page so that another new object will be created

    if (editMode) {

        setProductToBeEdited(null);

    }



        productGeneric = new ProductGeneric();

        ec.insertObject(productGeneric);

        productGeneric.setCommentaryAllowed(new Boolean(true));

        productGeneric.setIsAvailable(new Boolean(true));

        productGeneric.setSalesPrice(new Integer(0));

        return context().page();

    }



 _______________________________________________
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: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship]
      • From: Chuck Hill <email@hidden>
References: 
 >Debuging WOManyToManyRelationship (From: Dev WO <email@hidden>)
 >Re: Debuging WOManyToManyRelationship (From: Dev WO <email@hidden>)
 >Re: Debuging WOManyToManyRelationship (From: Chuck Hill <email@hidden>)
 >Re: Debuging WOManyToManyRelationship (From: Dev WO <email@hidden>)
 >Re: Debuging WOManyToManyRelationship (From: Chuck Hill <email@hidden>)
 >Re: Debuging WOManyToManyRelationship (From: Dev WO <email@hidden>)
 >EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship] (From: Dev WO <email@hidden>)
 >Re: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship] (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Problems with Safari
  • Next by Date: EOModeler Question
  • Previous by thread: Re: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship]
  • Next by thread: Re: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship]
  • Index(es):
    • Date
    • Thread