| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 2/11/2003, at 6:08 AM, Chuck Hill wrote:
A much safer solution. It can also make your code easier to read. RatherHaving said that, I see very little extra burden creating a second method instead of replacing the one in question.
than fiddling with projects() so that it only returns open projects (for
example), you can have methods like:
openProjects()
closedProjects()
projectsInState(ProjectState)
orderedProjects()
etc. Which will make the code much more explicit that using projects() and
hoping the reader of the code remembers that this is not really all the
projects.
Then you may be well advised to stay away from it until you have a realCatching notifications is probably the best way to go about it. See the EOEditingContext docs for relevant notifications.
To say I am not too confident with this part would be an understatement.
problem that demands optimization. Caching in eo objects is not a trivial
subject.
Make it right. Then, and only if needed, make it fast.
Also, the entity whose globalGlobal NSArray variable???
NSArray variable this is (for the destination of the to-many
relationship) gets released whenever the window is closed, helping with
one aspect.
An easier, albeit less effective, alternative is to do the filtering andWhile things do go ok when changes are applied to existing destination entities, I do see that it is quite possible for new records to be created, or ones deleted, that won't be reflected in the cached relationship. I should look at some way of checking for that (if I continue on this path) - probably by the ObjectsChangedInEditingContextNotification approach.
caching at the UI level. This avoids a lot of problems if you do it at the
form/page level and recache each time a new form/page is displayed. This
way the cache does not hang around long enough to introduce consistency
problems yet reduces the number of time the list is sorted and / or filtered.
Ray. _______________________________________________ webobjects-dev mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev Do not post admin requests to the list. They will be ignored.
| References: | |
| >Re: Filtering array returned by an EO's relationship (D2J) (From: Chuck Hill <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.