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:
   [EMAIL PROTECTED]

Database context for model B:
   [EMAIL PROTECTED]

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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to