Hi all,

I have 2 CoreData entities, Foo and Bar.  Both have 'name' string
attributes.  There are textfields allowing the user to rename any Foo
and any Bar.  Assume no 2 Foos can have the same name; likewise for
Bars.  There is a relationship between Foo and Bar.  I want a Foo to be
related to a Bar if and only if their names match.  That is, when the
user renames a Foo (or a Bar), I want to add/break a relationship
between the Bar (or Foo) of the same name.

Up to now I've done this by implementing Foo's setName: to 1) change
self's name and 2) fetch Bars of the same name.  Likewise for Bar.  This
works.  But it's slow if a single user action changes many names at once
because many redundant fetches are performed.

Any suggestions on a good pattern to solve this?

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to