Automate record creation in temp tables
Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/cd19f490db84d914#
I propose we move code following code into kDBItem::Create method, so when sub-item is being created in temp table, then it's ID is automatically assigned:
if ($object->IsTempTable()) {
$object->setTempID();
}
Also, when using temp tables and you are in OnAfterItemCreate method, then
$object->GetID() will return 0 instead of -1/-2/etc., because setTempID() is
called after kDBItem::Create() method is executed completely.