Index: dbitem.php =================================================================== --- dbitem.php (revision 13936) +++ dbitem.php (working copy) @@ -929,7 +929,7 @@ } } else { - if (($field_name == $this->IDField) && ($field_value == 0)) { + if (($field_name == $this->IDField) && ($field_value == 0) && !is_int($force_id)) { // don't skip IDField in INSERT statement, just use DEFAULT keyword as it's value $values_sql .= 'DEFAULT'; } @@ -968,7 +968,7 @@ $this->Application->resetCounters($this->TableName); } - if ($this->IsTempTable() && ($this->Application->GetTopmostPrefix($this->Prefix) != $this->Prefix)) { + if ($this->IsTempTable() && ($this->Application->GetTopmostPrefix($this->Prefix) != $this->Prefix) && !is_int($force_id)) { // temp table + subitem = set negative id $this->setTempID(); }