Re: Setting up horizontal inheritance
Re: Setting up horizontal inheritance
- Subject: Re: Setting up horizontal inheritance
- From: Lachlan Deck <email@hidden>
- Date: Tue, 4 Nov 2008 17:03:14 +1100
On 04/11/2008, at 9:12 AM, Chuck Hill wrote:
On Nov 2, 2008, at 10:30 PM, Paul Hoadley wrote:
On 03/11/2008, at 3:59 PM, Chuck Hill wrote:
[2008-11-3 16:53:8 CST] <WorkerThread2>
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
java.lang.IllegalStateException: rowDiffsForAttributes: snapshot in
com.webobjects.eoaccess.EODatabaseOperation {_dbSnapshot = {};
_entity = "AMPerson"; _newRow = {lastName = "Hoadley"; lastLogin =
2008-11-03 06:23:08 Etc/GMT; id = 1; username = "super"; dob =
1973-06-07 14:30:00 Etc/GMT; password =
"hFG6ihTXl1PTTLM7UbpGtLAl64E="; firstName = "Paul"; lastPWChange =
2007-11-12 13:30:00 Etc/GMT; }; _object = "PERSON: Paul Hoadley";
_globalID = _EOIntegralKeyGlobalID[AMPerson (java.lang.Integer)1];
_databaseOperator = "EODatabaseUpdateOperator"; } does not contain
value for attribute named contactDetailsID with snapshot key:
contactDetailsID
So back up a bit in that error message:
_dbSnapshot = {};
That it is specifically complaining about contactDetailsID is is red
herring. The snapshot does not have values for any of the attibutes,
it is empty / missing.
If you're mapping the parent entity to a table in the db - you've got
VI rather than HI. I've never heard anyone mention before this thread
that for HI your parent entity needs to map to an external table for
pk generation. Again, if your parent entity has an external table
you're using VI.
Several things can cause this. Some examples,. http://lists.apple.com/archives/webobjects-dev/2008/Apr/msg00458.html
Google for "_dbSnapshot = {};" for more.
IIRC, a bug with VI can also cause this. Lachlan may recall.
For VI your _changedValues will be {} for the parent entity - which
will give you a lock operation (with default EOF EODatabaseContext
anyway) - if the attributes for the parent entity have not been
changed prior to saveChanges.
This (pulled from the thread you've linked to is the common cause:
This is mostly commonly caused by not locking / improperly locking
EOEditingContext, EODatabaseContext, and probably a few of their
friends like EOObjectStoreCoordinator.
Or EOF got into a weird state. Is this happening on a relationship
e.g., from a child entity to another child entity?
with regards,
--
Lachlan Deck
_______________________________________________
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