Re: rowDiffsForAttributes
Re: rowDiffsForAttributes
- Subject: Re: rowDiffsForAttributes
- From: Chuck Hill <email@hidden>
- Date: Tue, 04 Mar 2014 19:05:53 +0000
- Thread-topic: rowDiffsForAttributes
Hi David,
On 2014-03-04, 8:35 AM, "David Avendasora" wrote:
Hey all,
I’m getting the following exception (I added line breaks to make it digestible by any on the list):
IllegalStateException: rowDiffsForAttributes: snapshot in com.webobjects.eoaccess.EODatabaseOperation
{
_dbSnapshot = {};
_entity = "MYEntity";
_newRow =
{
whatsit = "PHONE";
whosit = false;
chuckIt = false;
Hey! I resemble that attribute!
id = 3451;
};
_object = "<com.nekesto.neo.model.MYEntity pk:"3451">";
_globalID = _EOIntegralKeyGlobalID[MYEntity (java.lang.Long)3451];
_databaseOperator = "EODatabaseUpdateOperator";
} does not contain value for attribute named chuckIt with snapshot key: chuckIt
I can see that the _dbSnapshot is completely empty and I know that that is what it’s complaining about. The object exists in the DB with a PK matching the id value, which matches up with the _object and the _globalID. How could the _dbSnapshot end up empty?
What horribly-inappropriate thing have done?
Something has cause it to be discarded. Off the top of my head:
- lack of locking the OSC or dbCtxt before mucking about in EOF
- Mis-handled child editing contexts
- Object were invalidated (probably goes back to first point)
I have gone over everyplace I instantiate “MYEntity” and I’m never using the EO’s constructor, it’s always being done by ERXEOControlUtilities.createAndInsertObject(editingContext, “MYEntity”).
Does this only happen for objects created in this instance (e.g without restarting it), or does it also happen for “old” objects?
As far as I can tell I’m never crossing EC boundaries without localInstancing it.
That would not do it.
Is there anything else that can cause the _dbSnapshot to be empty?
I’m making use of multiple EOObjectStoreCoordinators, 1 each for two different EOModelGroups, but this code should only ever be using the defaultModelGroup in the defaultObjectStoreCoordinator. So I don’t *think* it has anything to do with that, but, well,
I’m me and I do stuff all the time that future me is shocked at.
There could be some lack of locking around that or maybe notifications getting processed by the wrong object store, or notifications from one OSC getting processes when you are not expecting them? What are you doing with the other OSC? Do you have change
notifications turned on between instances?
Chuck
Dave
—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.
|
_______________________________________________
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