From 5aba966a4b60adabd81a50af21a4f2738c46b768 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 5 Oct 2021 18:58:55 +0200 Subject: [PATCH] IcingaCommandArgument: use a combined key --- library/Director/Objects/IcingaCommandArgument.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Director/Objects/IcingaCommandArgument.php b/library/Director/Objects/IcingaCommandArgument.php index 925fe318..96101ce6 100644 --- a/library/Director/Objects/IcingaCommandArgument.php +++ b/library/Director/Objects/IcingaCommandArgument.php @@ -7,7 +7,9 @@ use RuntimeException; class IcingaCommandArgument extends IcingaObject { - protected $keyName = 'id'; + protected $keyName = ['command_id', 'argument_name']; + + protected $autoincKeyName = 'id'; protected $table = 'icinga_command_argument'; @@ -129,6 +131,7 @@ class IcingaCommandArgument extends IcingaObject } $this->transformPlainArgumentValue($plain); + unset($plain->command_id); // Will happen only combined with $skipDefaults if (array_keys((array) $plain) === ['value']) {