Active
Project:
Relation
Version:
8.x-1.x-dev
Component:
API
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2014 at 08:51 UTC
Updated:
8 Dec 2014 at 08:51 UTC
So D7 version does this to ensure that conditions are not matched to same endpoint multiple times.
for ($i = 0; $i < $arity; $i++) {
for ($k = $i + 1; $k < $arity; $k++) {
$column_left = 'field_data_endpoints_delta_' . $i . '.endpoints_r_index';
$column_right = 'field_data_endpoints_delta_' . $k . '.endpoints_r_index';
$query->where("$column_left != $column_right");
}
}
Alternate way could be to use query aggregation and conditionAggregate if there are multiple references to same entity.