protected static function _relationsToLoad()
{
try {
if (!($connection = static::connection())) {
return;
}
} catch (ConfigException $e) {
return;
}
if (!$connection::enabled('relationships')) {
return;
}
$self = static::_object();
foreach ($self->_relationTypes as $type) {
$self->{$type} = Set::normalize($self->{$type});
foreach ($self->{$type} as $name => $config) {
$self->_relationsToLoad[$name] = $type;
$fieldName = $self->_relationFieldName($type, $name);
$self->_relationFieldNames[$fieldName] = $name;
}
}
}