• 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 vector modeling query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data vector modeling query


  • Subject: Core Data vector modeling query
  • From: Paul Tomlin <email@hidden>
  • Date: Mon, 1 Dec 2008 11:23:30 +0200

Using an analogy, I'm trying to model a 'vector' using CD. I have a Vector entity, which has 2 to-one relationships to a VectorEnpoint entity. The VectorEndpoint entity describes how the Vector is connected at one end to other entities in the model

Vector:
source -> to-one -> VectorEndpoint
target -> to-one -> VectorEndpoint

I need a VectorEndpoint entity because the definition of the 'end' of each vector is not straightforward.

My query is how should I model the inverse of these 'source' and 'target' relationships?

VectorEndpoint:
vector -> to-one -> Vector

simply doesn't work because the Vector entity has 2 relationships which ideally need inverses (I can only choose 'source' or 'target' as the inverse).

One possible solution I can think of involves having different entities for each end. I'm pondering if this is going to be a suitable solution for my task. It does seem a little wrong, intuitively at least.

AbstractVectorEndpoint:
(abstract + common data)

VectorSourceEndpoint:
vector -> to-one -> Vector (source)

VectorTargetEndpoint:
vector -> to-one -> Vector (target)


Any thoughts or pointers? _______________________________________________

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: NSTrackingArea strange requirement
  • Next by Date: Re: NSArrayController trouble
  • Previous by thread: Re: NSTrackingArea strange requirement
  • Next by thread: Re: Core Data vector modeling query
  • Index(es):
    • Date
    • Thread