• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data modeling question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data modeling question


  • Subject: Core Data modeling question
  • From: Markus Schneider <email@hidden>
  • Date: Wed, 26 Nov 2008 22:08:50 +0100

Hi All,

I have started using CoreData and have a modeling question.

My model has a managed object "TASK", which shall be executed each day during a time period.

Therefore, I have added a startDate and an endDate as attributes:

	TASK
		- startDate
		- endDate



Now in this time period there are exceptions, when the task shall not be executed (e.g. holidays etc)


	TASK
		- startDate
		- endDate

		- exceptions
				- day1
				- day2
				- day3


I thought on having a list of date objects containing the exceptions. But how should I model this? I cannot create a NSMutableArray to store the dates in the persistent store.
Shall I use a MO class "DAY" and model the list as a to-many relationship?


	TASK
		- startDate
		- endDate

		- exceptions  ------------->  DAY
								  - date

Is this really necessary or is there a  more elegant way?

Any help/advice  appreciated.

Thanks,

Markus
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Core Data modeling question
      • From: Alexander Spohr <email@hidden>
  • Prev by Date: Figure out the size of an NSAttributedString
  • Next by Date: Re: Figure out the size of an NSAttributedString
  • Previous by thread: Re: Figure out the size of an NSAttributedString
  • Next by thread: Re: Core Data modeling question
  • Index(es):
    • Date
    • Thread