Make database insertion play nice with autoloading.

develop
Sven Slootweg 12 years ago
parent 4caf68e6ff
commit 8a46f5d630

@ -418,11 +418,14 @@ abstract class CPHPDatabaseRecordClass extends CPHPBaseClass
$sValueList[] = $sFinalValue; $sValueList[] = $sFinalValue;
} }
else else
{
if($this->autoloading === false)
{ {
$classname = get_class($this); $classname = get_class($this);
throw new Exception("Database insertion failed: prototype property {$value['key']} not found in object of type {$classname}."); throw new Exception("Database insertion failed: prototype property {$value['key']} not found in object of type {$classname}.");
} }
} }
}
if($insert_mode == CPHP_INSERTMODE_INSERT) if($insert_mode == CPHP_INSERTMODE_INSERT)

Loading…
Cancel
Save