Skip navigation.
 
mlCore Data vector modeling query
FROM : Paul Tomlin
DATE : Mon Dec 01 10:23:30 2008

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?

Related mailsAuthorDate
mlCore Data vector modeling query Paul Tomlin Dec 1, 10:23
mlRe: Core Data vector modeling query Erik Buck Dec 1, 15:59
mlRe: Core Data vector modeling query Erik Buck Dec 1, 16:02
mlRe: Core Data vector modeling query Thomas Davie Dec 1, 16:08
mlRe: Core Data vector modeling query Paul Tomlin Dec 1, 16:30