cannot update primary-key error
cannot update primary-key error
- Subject: cannot update primary-key error
- From: "Albert Jagnow" <email@hidden>
- Date: Tue, 15 Feb 2005 17:08:06 -0600
- Importance: normal
- Priority: normal
I have an application that has a typical parent to child one to many
database relationship. I have no problems creating or saving new
parent or child objects. I also have no problems editing existing
child objects that are retrieved from the database. But, if I create a
new child object and save it then select that object edit it and save
again I get the following error on save:
cannot update primary-key 'bkseq' from '89136' to '89136' on object:
<object information>...
at
com.webobjects.eoaccess.EODatabaseContext._verifyNoChangesToReadonlyEnti
ty(EODatabaseContext.java:4886)
at
com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseConte
xt.java:6355)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingCo
ntext(EOObjectStoreCoordinator.java:415)
at
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.j
ava:3165)
at MyComponent.saveChanges(MyComponent.java:138)...
If I restart the application I can edit the object that caused the
error, but if I create a new object, save it, edit it, save again I
always get the error. For whatever reason WebObjects appears to be
trying to update the primary key of the parent object even though I am
only making changes to the child object. Any one have any idea what
causes this error or how to correct it?
--
Albert Jagnow
Web Developer
The University of Iowa Foundation
_______________________________________________
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