Re: Cannot obtain globalId for an object which is not registered in any editingContext
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