mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-25 14:54:25 +02:00
DbObject: do not insert id=NULL, fails on pgsql
This commit is contained in:
parent
bea63149c6
commit
6c8213f4db
@ -550,7 +550,11 @@ abstract class DbObject
|
|||||||
*/
|
*/
|
||||||
protected function insertIntoDb()
|
protected function insertIntoDb()
|
||||||
{
|
{
|
||||||
return $this->db->insert($this->table, $this->getProperties());
|
$properties = $this->getProperties();
|
||||||
|
if ($this->autoincKeyName !== null) {
|
||||||
|
unset($properties[$this->autoincKeyName]);
|
||||||
|
}
|
||||||
|
return $this->db->insert($this->table, $properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user