mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
DbObject: NOTE -> recheck this
This commit is contained in:
parent
8fa47c28ae
commit
3c95fd7ec8
@ -398,6 +398,7 @@ abstract class DbObject
|
||||
*/
|
||||
public function getProperties()
|
||||
{
|
||||
//return $this->properties;
|
||||
$res = array();
|
||||
foreach ($this->listProperties() as $key) {
|
||||
$res[$key] = $this->get($key);
|
||||
@ -406,6 +407,11 @@ abstract class DbObject
|
||||
return $res;
|
||||
}
|
||||
|
||||
protected function getPropertiesForDb()
|
||||
{
|
||||
return $this->properties;
|
||||
}
|
||||
|
||||
public function listProperties()
|
||||
{
|
||||
return array_keys($this->properties);
|
||||
@ -650,7 +656,7 @@ abstract class DbObject
|
||||
*/
|
||||
protected function insertIntoDb()
|
||||
{
|
||||
$properties = $this->getProperties();
|
||||
$properties = $this->getPropertiesForDb();
|
||||
if ($this->autoincKeyName !== null) {
|
||||
unset($properties[$this->autoincKeyName]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user