Service: Join notes_url using id only

The service join from notes_url is done with id only too.
This commit is contained in:
Eric Lippmann 2019-11-28 11:23:09 +01:00
parent 67a8f24e3a
commit e82d7bcab6
2 changed files with 6 additions and 2 deletions

View file

@ -32,6 +32,8 @@ class NotesUrl extends Model
$relations->hasMany('host', Host::class)
->setCandidateKey('id')
->setForeignKey('notes_url_id');
$relations->hasMany('service', Service::class);
$relations->hasMany('service', Service::class)
->setCandidateKey('id')
->setForeignKey('notes_url_id');
}
}

View file

@ -92,7 +92,9 @@ class Service extends Model
$relations->belongsTo('action_url', ActionUrl::class)
->setCandidateKey('action_url_id')
->setForeignKey('id');
$relations->belongsTo('notes_url', NotesUrl::class);
$relations->belongsTo('notes_url', NotesUrl::class)
->setCandidateKey('notes_url_id')
->setForeignKey('id');
$relations->belongsTo('icon_image', IconImage::class);
$relations->belongsTo('zone', Zone::class);
$relations->belongsTo('endpoint', Endpoint::class)