• 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: Cannot obtain globalId for an object which is not registered in any editingContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot obtain globalId for an object which is not registered in any editingContext


  • Subject: Re: Cannot obtain globalId for an object which is not registered in any editingContext
  • From: email@hidden
  • Date: Mon, 27 Dec 2004 15:35:56 -0600


Andrew Kinnie <email@hidden> wrote:


> Greetings:
>
> I am trying to redesign the site that was causing problems.  I
> previously tried to add a new table to the database that was underlying

...


Andrew,

I see problems in two places in that code.

1)        if(! editingObject) {
        newBooking = (Booking)EOUtilities.createAndInsertInstance(ec, "Booking");

         ec.insertObject(newBooking);                        <--   already inserted in createAndInsertInstance (which may not be harmful)

2)        ec.saveChanges();
       showBookingEntryForm = false;
       newBooking = new Booking();                        <--         It's creating a second Booking every time (which isn't registered in an EC)
       return null;

Do I read that correctly?

Hope this helps,
Chris Wakefield
 _______________________________________________
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

  • Prev by Date: (no subject)
  • Next by Date: Re: (no subject)
  • Previous by thread: Re: Adding Third Party Java Class Files
  • Next by thread: Customizing the app...
  • Index(es):
    • Date
    • Thread