source/Spiral/ORM/AbstractRecord.php
protected function packChanges(bool $skipPrimary = false): array
    {
        if (!$this->hasChanges() && !$this->isSolid()) {
            return [];
        }

        if ($this->isSolid()) {
            //Solid record always updated as one big solid
            $updates = $this->packValue();
        } else {
            //Updating each field individually
            $updates = [];
            foreach ($this->getFields(false) as $field => $value) {
                //Handled by sub-accessor
                if ($value instanceof RecordAccessorInterface) {
                    if ($value->hasChanges()) {
                        $updates[$field] = $value->compileUpdates($field);
                        continue;
                    }

                    $value = $value->packValue();
                }

                //Field change registered
                if (array_key_exists($field, $this->changes)) {
                    $updates[$field] = $value;
                }
            }
        }

        if ($skipPrimary) {
            unset($updates[$this->primaryColumn()]);
        }

        return $updates;
    }
protected function packChanges(bool $skipPrimary = false): array
    {
        if (!$this->hasChanges() && !$this->isSolid()) {
            return [];
        }

        if ($this->isSolid()) {
            //Solid record always updated as one big solid
            $updates = $this->packValue();
        } else {
            //Updating each field individually
            $updates = [];
            foreach ($this->getFields(false) as $field => $value) {
                //Handled by sub-accessor
                if ($value instanceof RecordAccessorInterface) {
                    if ($value->hasChanges()) {
                        $updates[$field] = $value->compileUpdates($field);
                        continue;
                    }

                    $value = $value->packValue();
                }

                //Field change registered
                if (array_key_exists($field, $this->changes)) {
                    $updates[$field] = $value;
                }
            }
        }

        if ($skipPrimary) {
            unset($updates[$this->primaryColumn()]);
        }

        return $updates;
    }
protected function packChanges ( bool $ skipPrimary = false ) : array { if ( ! $ this -> hasChanges ( ) && ! $ this -> isSolid ( ) ) { return [ ] ; } if ( $ this -> isSolid ( ) ) { //Solid record always updated as one big solid $ updates = $ this -> packValue ( ) ; } else { //Updating each field individually $ updates = [ ] ; foreach ( $ this -> getFields ( false ) as $ field => $ value ) { //Handled by sub-accessor if ( $ value instanceof RecordAccessorInterface ) { if ( $ value -> hasChanges ( ) ) { $ updates [ $ field ] = $ value -> compileUpdates ( $ field ) ; continue ; } $ value = $ value -> packValue ( ) ; } //Field change registered if ( array_key_exists ( $ field , $ this -> changes ) ) { $ updates [ $ field ] = $ value ; } } } if ( $ skipPrimary ) { unset ( $ updates [ $ this -> primaryColumn ( ) ] ) ; } return $ updates ; }
Create set of fields to be sent to UPDATE statement.

@param bool $skipPrimary Skip primary key

@return array
Create set of fields to be sent to UPDATE statement .