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

sun’s picture

Project: Awesome relationships » Relation
Version: » 7.x-1.x-dev
naught101’s picture

Status: Active » Closed (fixed)

they aren't anymore :)

naught101’s picture

Status: Closed (fixed) » Active

hrm. 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.

Shadlington’s picture

Issue tags: +1.0 blocker

Tagging

naught101’s picture

Status: Active » Fixed

see reboot branch. This is fixed. #1113654: Relation reboot

Status: Fixed » Closed (fixed)
Issue tags: -1.0 blocker

Automatically closed -- issue fixed for 2 weeks with no activity.