diff --git a/class.databaserecord.php b/class.databaserecord.php index bf78673..b76a523 100644 --- a/class.databaserecord.php +++ b/class.databaserecord.php @@ -419,8 +419,11 @@ abstract class CPHPDatabaseRecordClass extends CPHPBaseClass } else { - $classname = get_class($this); - throw new Exception("Database insertion failed: prototype property {$value['key']} not found in object of type {$classname}."); + if($this->autoloading === false) + { + $classname = get_class($this); + throw new Exception("Database insertion failed: prototype property {$value['key']} not found in object of type {$classname}."); + } } }