mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Service: Join notes_url using id only
The service join from notes_url is done with id only too.
This commit is contained in:
parent
67a8f24e3a
commit
e82d7bcab6
2 changed files with 6 additions and 2 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue