Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GorillaPaws

macrumors 6502a
Original poster
Oct 26, 2003
932
8
Richmond, VA
So I'm playing around with a core data app idea, and my model will have a type entity which is a relationship off of the main item class. Each Item can have 1 Type, and each Type can refer to 0-many Items. I was thinking about how the user would be entering the data and came up with 2 possible options to make this step easier.

1. the Type entity would keep track of the most recently used type and use that as the default when a new item is created.

2. the Type entity would calculate and store the most frequently used type and use it as the default when a new item is created (ties could be resolved by most recently used).

I'm curious if you guys have thoughts on which of the above strategies would make the most sense, but also on the best way to implement these designs? Do I use a fetched property on my Type entity in the data model? or should I just write a method in my Type custom subclass of NSManagedObject? Are there other aspects to this problem that I'm not taking into consideration that I should?

Thanks in advance for your help.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.