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: Andrew Kinnie <email@hidden>
- Date: Tue, 28 Dec 2004 15:27:41 -0500
That was it. Thanks. I added a line to try and resolve a different
problem, then didn't comment out the other line creating a new booking
object again. I looked at it a zillion times and didn't see it.
Thanks.
Andrew
From: email@hidden
Subject: Re: Cannot obtain globalId for an object which is not
registered in any editingContext
To: email@hidden
Message-ID:
<OFCE34F10A.90A2906D-ON86256F77.0075AD32
email@hidden>
Content-Type: text/plain; charset="us-ascii"
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