• 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
Re: Core Data: Dual-Inverse Relation Possible in Modeler?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: Dual-Inverse Relation Possible in Modeler?


  • Subject: Re: Core Data: Dual-Inverse Relation Possible in Modeler?
  • From: email@hidden
  • Date: Thu, 20 Oct 2005 23:01:27 -0700


At 19:17, mmalcolm crawford wrote:


On Oct 20, 2005, at 7:10 PM, email@hidden wrote:


As an example, there are a bunch of fighters, they have a to-many relation called "Enemies,"
so when say Nightman adds Batman as one of his enemies, Batman also adds Nightman as one
of his enemies, and when either Batman or Nightman takes the other off the list, then the other also reciprocates. Is this possible to set in the modeler, or would I need to just add some custom code in my Managed object?



Core Data does this automatically.
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/ Articles/cdLifecycleManagement.html#//apple_ref/doc/uid/ TP40001652-207874-TPXREF149>


mmalc

Yea, I read that, and while if I add Nightman to Batmans' list of enemies, Batman is not listed in Nightmans' automatically because
thier "enemies" to-many relation are the same name, thats what I meant by a Dual-Inverse, where the inverse relation is to the same
relation of the same entity. IOW, not like the previous example where an employee gets a "manager" and then the "directReports" adds the employee,
this works automatically as inverse because they are different relationship names even though the same entity, but if they were the same name,
I think it can only be done in code if the relations are the same name and same entity.


In otherwords this cant be done in the modeler GUI:

Entity:Attacker                    Entity:Attacker
Name:Batman                    Name:Nightman
Relation:Enemies <<-->>Relation:Enemies (To-Many Inverse to itself)

What I'm really concerned is if its a bad design...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Core Data: Dual-Inverse Relation Possible in Modeler?
      • From: Scott Ellsworth <email@hidden>
References: 
 >Core Data: Dual-Inverse Relation Possible in Modeler? (From: email@hidden)
 >Re: Core Data: Dual-Inverse Relation Possible in Modeler? (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Live sorting in NSTreeController and NSOutlineView?
  • Next by Date: Binding to CoreImage?
  • Previous by thread: Re: Core Data: Dual-Inverse Relation Possible in Modeler?
  • Next by thread: Re: Core Data: Dual-Inverse Relation Possible in Modeler?
  • Index(es):
    • Date
    • Thread