src/ORM/DataObject.php
protected function writeBaseRecord($baseTable, $now)
    {
        // Generate new ID if not specified
        if ($this->isInDB()) {
            return;
        }

        // Perform an insert on the base table
        $manipulation = [];
        $this->prepareManipulationTable($baseTable, $now, true, $manipulation, $this->baseClass());
        DB::manipulate($manipulation);

        $this->changed['ID'] = self::CHANGE_VALUE;
        $this->record['ID'] = DB::get_generated_id($baseTable);
    }
protected function writeBaseRecord($baseTable, $now)
    {
        // Generate new ID if not specified
        if ($this->isInDB()) {
            return;
        }

        // Perform an insert on the base table
        $manipulation = [];
        $this->prepareManipulationTable($baseTable, $now, true, $manipulation, $this->baseClass());
        DB::manipulate($manipulation);

        $this->changed['ID'] = self::CHANGE_VALUE;
        $this->record['ID'] = DB::get_generated_id($baseTable);
    }
protected function writeBaseRecord ( $ baseTable , $ now ) { // Generate new ID if not specified if ( $ this -> isInDB ( ) ) { return ; } // Perform an insert on the base table $ manipulation = [ ] ; $ this -> prepareManipulationTable ( $ baseTable , $ now , true , $ manipulation , $ this -> baseClass ( ) ) ; DB :: manipulate ( $ manipulation ) ; $ this -> changed [ 'ID' ] = self :: CHANGE_VALUE ; $ this -> record [ 'ID' ] = DB :: get_generated_id ( $ baseTable ) ; }
Ensures that a blank base record exists with the basic fixed fields for this dataobject

Does nothing if an ID is already assigned for this record

@param string $baseTable Base table
@param string $now Timestamp to use for the current time
Ensures that a blank base record exists with the basic fixed fields for this dataobject