| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| Hi Fabian, Fabian Peters wrote:
Well, I think while the exception you get looks similar, your problem seems to be different. See below.
This is very interesting: it seems your Foo fetch is done while some references to old result sets of old entities are still there in the EOAccess layer... It looks like an initialization issue in EOF: _propertiesToFetch() method in EODatabaseChannel class seems to return a bad attributes array in the _selectWithFetchSpecificationEditingContext(EOFetchSpecification, EOEditingContext) which is called by the selectObjectsWithFetchSpecification(EOFetchSpecification, EOEditingContext) method. I think maybe one of the following scenario may match your case: 1. The protected _resultSet ResultSet instance attribute in the JDBCChannel class has not been initialized before the Foo fetch, so it still hold a reference to the last EOShared attributes previously fetched. This _resultset is normally set in the _evaluateExpression(EOSQLExpression, boolean, boolean) method and cleared in the _endFetch() method. 2. The _currentEntity in the EODatabaseChannel has not been initialized before the Foo fetch, so it still hold a reference to the last fetched EOShared.
Yes, I think it may be related to the shared entities fetch only.
I think you could avoid this problem with a simple automatic model initialization on application startup. You just have to register a method to the WOApplication. ApplicationDidFinishLaunchingNotification notification. In this method, you loop through each model of your model group and perform an assertConnectionDictionaryIsValid() to each adaptor associated to the model database context. This will open the connections to the databases and all shared entities will be fetch a this time, and not just before your Foo fetch. Kind regards, -- Francis Labrie Saint-Bruno-de-Montarville, Quebec, Canada |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.