Elgg/Elgg — pull request #7330 by hypeJunction (2014-10-18 09:57:23+00:00)
Title: fix(relationships): distinct ege* results when relationship_guid is not ...

...set

elgg_get_entities_from_relationship() was returning duplicate entities when relationship_guid was not set. This was likely caused by MySQL optimizing the query and using a different index to fulfill the r.id select.

Specifying group_by in cases where relationship_guid is not set fixes the issue.

Fixes #5775