Self references are very valid relationships. What is the rationale of actively preventing them in awesomerelationship?
$query->innerJoin('relationship_data', 'l', 'base.relationship_id = l.relationship_id');
$query->innerJoin('relationship_data', 'r', 'base.relationship_id = r.relationship_id AND NOT (l.entity_type = r.entity_type AND l.entity_id = r.entity_id)');
Comments
Comment #1
sunComment #2
naught101 commentedthey aren't anymore :)
Comment #3
naught101 commentedhrm. works, but at the moment, the code doesn't recognise that the relation is pointing to itself, so it might cause cause problems. We need some kind of self-reference check, if we want to (dis)allow this behaviour.
Comment #4
Shadlington commentedTagging
Comment #5
naught101 commentedsee reboot branch. This is fixed. #1113654: Relation reboot