From: Jeremy R. (JIRA) <jir...@ob...> - 2008-04-29 19:29:29
|
Code to cache entityDelegates in ERXDefaultRestDelegate uses different key to set then to retrieve -------------------------------------------------------------------------------------------------- Key: WONDER-105 URL: http://issues.objectstyle.org/jira/browse/WONDER-105 Project: Project Wonder Issue Type: Bug Environment: WebObjects 5.3.3 Project Wonder 5.3 Reporter: Jeremy Rosenberg Assigned To: Anjo Krank In ERXDefaultRestDelegate there is a method to retrieve an entity delegate given the entity: public IERXRestEntityDelegate entityDelegate(EOEntity entity) This method caches loaded delegates in the _entityDelegates method. At the beginning of the method is attempts to retrieve a cached version of the delegate with: IERXRestEntityDelegate entityDelegate = (IERXRestEntityDelegate) _entityDelegates.objectForKey(entity.name()); But at the end of the method when it sets the newly loaded delegate it uses the code: _entityDelegates.setObjectForKey(entity, entityDelegate); Since the key is different (and in the wrong order) the code is never able to retrieve pre-loaded delegates. It is loading many delegates for the same entity Suggested new code: _entityDelegates.setObjectForKey(entityDelegate, entity.name()); I've tested this and it works for me. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.objectstyle.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |