public function insert($model, $onDuplicate = false)
    {
        $query = $this->insertQuery($model, $onDuplicate);
        $query->execute();

        return $this->getDB()->lastInsertID();
    }
public function insert($model, $onDuplicate = false)
    {
        $query = $this->insertQuery($model, $onDuplicate);
        $query->execute();

        return $this->getDB()->lastInsertID();
    }
public function insert ( $ model , $ onDuplicate = false ) { $ query = $ this -> insertQuery ( $ model , $ onDuplicate ) ; $ query -> execute ( ) ; return $ this -> getDB ( ) -> lastInsertID ( ) ; }
Inserts a Record into the database
@param Record $model
@param array|bool $onDuplicate
@return integer
Inserts a Record into the database