DbObject: NOTE -> recheck this

This commit is contained in:
Thomas Gelf 2016-03-24 13:32:11 +01:00
parent 8fa47c28ae
commit 3c95fd7ec8

View File

@ -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]);
}