• 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
Polymorphic relationship and migration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Polymorphic relationship and migration


  • Subject: Polymorphic relationship and migration
  • From: Yi Lin <email@hidden>
  • Date: Fri, 27 Nov 2009 17:14:17 -0800

Hi All,

I ran into a issue where polymorphic relationship is not maintained by the automatically-generated Core Data mapping model.

For example, if I have a relationship called "shape" that refers to the Shape abstract entity, with concrete classes Triangle, Square, etc. In the mapping model, there's no sensible setting for the Mapping Name field of "shape". If I set the Mapping Name to TriangleToTriangle, then Square relationships will not be set. And if I set the Mapping Name to "Shape", than the relationship would not be set at all because there are no concrete instances of Shape.

Is this a oversight in the design of Core Data, or am I using it incorrectly?

Thanks,
Yi
_______________________________________________

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: Polymorphic relationship and migration
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Animating color fading
  • Next by Date: DADiskMount usage
  • Previous by thread: Re: Animating color fading
  • Next by thread: Re: Polymorphic relationship and migration
  • Index(es):
    • Date
    • Thread