Child pages
  • Automate record creation in temp tables
Skip to end of metadata
Go to start of metadata

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(); 
}

Related Tasks

INP-484 - Getting issue details... STATUS

6 Comments

  1. 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.

  2. Any possible implications if we removed that?

    if ($object->IsTempTable()) {
        $object->setTempID();

    }

  3. We don't remove, we move it up into deeper code, what calls
    OnAfterItemCreate. Implications would be if you miss to add it in your own
    code.

  4. Great -  would you please upload the patch so we can review and test
    it as a bug then.

    DA.

  5. Here is the task:

    INP-484 - Getting issue details... STATUS


  6. Here is the task:

    INP-484 - Getting issue details... STATUS