public function on_create() { $db = DB::getInstance(); $this->id = $db->db_insert_id(); parent::on_create(); }