• 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: Cross-Model Relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data: Cross-Model Relationships


  • Subject: Core Data: Cross-Model Relationships
  • From: Kai BrĂ¼ning <email@hidden>
  • Date: Tue, 13 Nov 2007 23:28:02 +0100

Hi,

I am having a rather complex Core Data Model (27 entities so far and counting). While this is obviously no big deal for the engine at all, I a having reasons to split this into multiple models:

- While the Xcode data model editor is nice to work with, it has (as typical for graphical editors) its issues concerning change control. The editor makes it very easy to change things unintentional, and the storage format makes it hard to compare two versions to check what changed.
Separation into sub-models would keep changes more localized.


- I need to make parts of the whole store exportable into separate files for exchange between users. My idea is to use small Core Data stores as exchange format. The models for these files are sub-models of the whole. Using the same model file for both the exchange store and as part of the whole model has the obvious advantage of less maintenance work and guaranteeing them being in sync.

So far, so easy: +[NSManagedObjectModel modelByMergingModels:] will merge my sub-models nicely. But I need some cross-sub-model relationships. My idea is to create these relationships programmatically after the sub-models have been loaded and merged into one model.

Questions:

- Is this feasible and a good idea?
- Does my whole consideration make sense?
- Is there a better/easier way to achieve what I want?

Thanks a lot for any thoughts

Kai
_______________________________________________

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


  • Prev by Date: Re: Finding NSTableColumn in gdb
  • Next by Date: How to observe Core Data add/remove actions?
  • Previous by thread: Re: CATextLayer question
  • Next by thread: re: Core Data: Cross-Model Relationships
  • Index(es):
    • Date
    • Thread