Re: The object with globalID cannot be found
Re: The object with globalID cannot be found
- Subject: Re: The object with globalID cannot be found
- From: Henrique Prange <email@hidden>
- Date: Wed, 26 Nov 2008 15:22:03 -0200
Hi Chuck,
Chuck Hill wrote:
From your descriptions, it sounds like the models are not getting
connected with the same connection dictionary. Try using the
EOUtilities method:
public static EODatabaseContext
databaseContextForModelNamed(EOEditingContext ec, String name)
To get the EODatabaseContext and EODatabase from each model and test if
they are the same objects or not. They should be the same.
I did what you suggested. I added the code to execute as soon as Main
component is loaded. I get the following result:
Database context for model A:
com.webobjects.eoaccess.EODatabaseContext@c1eecd
Database context for model B:
com.webobjects.eoaccess.EODatabaseContext@c1eecd
Is database context equals? true
So, they are equals. That it is not the problem. Wait... I tried to
search and edit an object with the problem I described. Surprisingly, it
worked. Problem solved. Let me remove the test code I added. Stop the
application, start and... I can't edit the object again because of the
same exception I've reported.
So, if I leave the code to test database context equality at session's
startup, the application works. If I remove the code, I get the
exception. I tried 3 times both situations. The exception always appears
when there is no test code. And the application always works when the
test code is there. Weird.
Any ideas? :p
Cheers,
Henrique
_______________________________________________
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