86 static $relations = [];
88 $diff = array_diff($propertyIds, array_keys($relations));
91 $dbRes = static::getList([
92 'select' => [
'PROPERTY_ID',
'ENTITY_ID',
'ENTITY_TYPE'],
93 'filter' => [
'@PROPERTY_ID' => $diff]
96 while ($data = $dbRes->fetch())
98 $relations[$data[
'PROPERTY_ID']][] = [
99 'ENTITY_ID' => $data[
'ENTITY_ID'],
100 'ENTITY_TYPE' => $data[
'ENTITY_TYPE']
104 foreach ($diff as $id)
106 $relations[$id] = $relations[$id] ?? [];
110 return array_intersect_key($relations, array_fill_keys($propertyIds,
true));