SwatDB/SwatDBDataObject.php
protected function saveNewBinding()
    {
        $modified_properties = $this->getModifiedProperties();

        if (count($modified_properties) === 0) {
            return;
        }

        $fields = array();
        $values = array();

        foreach ($this->getModifiedProperties() as $name => $value) {
            $type = $this->guessType($name, $value);
            $fields[] = sprintf('%s:%s', $type, $name);
            $values[$name] = $value;
        }

        SwatDB::insertRow($this->db, $this->table, $fields, $values);
        $this->flushCacheNamespaces();
    }
protected function saveNewBinding()
    {
        $modified_properties = $this->getModifiedProperties();

        if (count($modified_properties) === 0) {
            return;
        }

        $fields = array();
        $values = array();

        foreach ($this->getModifiedProperties() as $name => $value) {
            $type = $this->guessType($name, $value);
            $fields[] = sprintf('%s:%s', $type, $name);
            $values[$name] = $value;
        }

        SwatDB::insertRow($this->db, $this->table, $fields, $values);
        $this->flushCacheNamespaces();
    }
protected function saveNewBinding ( ) { $ modified_properties = $ this -> getModifiedProperties ( ) ; if ( count ( $ modified_properties ) === 0 ) { return ; } $ fields = array ( ) ; $ values = array ( ) ; foreach ( $ this -> getModifiedProperties ( ) as $ name => $ value ) { $ type = $ this -> guessType ( $ name , $ value ) ; $ fields [ ] = sprintf ( '%s:%s' , $ type , $ name ) ; $ values [ $ name ] = $ value ; } SwatDB :: insertRow ( $ this -> db , $ this -> table , $ fields , $ values ) ; $ this -> flushCacheNamespaces ( ) ; }
Saves a new binding object without an id to the database

Only modified properties are saved. It is always inserted,
never updated.
Saves a new binding object without an id to the database