Hi again,

I was going to hear with you all about best practices for dealing with
what can be described as "fragile typing": Given the relationship
REMIXED going out from an artist, it's possible that the target node
is either and album or a single track. How do I solve this?

1. Use two relationships REMIXED_ALBUM and REMIXED_TRACK. This will
actually end up creating *very* many extra relationships in my case,
but that may not be a problem.

2. Set a targetType property on the relationship.

3. Set a entityType property on the target node.

In general, I know what kind of node I am dealing with by looking at
the path I traversed to get to it. But given any random node, I
currrently couldn't tell. This isn't so much a problem, but when
dealing with relationships that may have different kinds types of
targets it gets to be a bit messier. I'm certain you've thought a bit
about this problem, so could you share the pros and cons of the
methods I've suggested above. Are there other solutions?

Philip
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to