private function eagerLoadUpRefs(array $statement_ids, StoreOptions $opts)
{
$models = $this->where($opts)->whereIn('statement.object.id', $statement_ids)->where('statement.object.objectType', 'StatementRef')->get();
$collatedStatements = [];
foreach ($models as $model) {
$objectId = $model->statement['object']['id'];
if (!isset($collatedStatements[$objectId])) {
$collatedStatements[$objectId] = new Collection();
}
$collatedStatements[$objectId]->push($model);
}
return $collatedStatements;
}