function (record) {
        var me = this,
            fields = record.getFields(),
            idProperty = record.getIdProperty(),
            uniqueIdStrategy = me.getUniqueIdStrategy(),
            data = {},
            name, value;

        fields.each(function (field) {
            if (field.getPersist()) {
                name = field.getName();
                if (name === idProperty && !uniqueIdStrategy) {
                    return;
                }
                value = record.get(name);
                if (field.getType().type == 'date') {
                    value = me.writeDate(field, value);
                }
                data[name] = value;
            }
        }, me);

        return data;
    }
function (record) {
        var me = this,
            fields = record.getFields(),
            idProperty = record.getIdProperty(),
            uniqueIdStrategy = me.getUniqueIdStrategy(),
            data = {},
            name, value;

        fields.each(function (field) {
            if (field.getPersist()) {
                name = field.getName();
                if (name === idProperty && !uniqueIdStrategy) {
                    return;
                }
                value = record.get(name);
                if (field.getType().type == 'date') {
                    value = me.writeDate(field, value);
                }
                data[name] = value;
            }
        }, me);

        return data;
    }
function ( record ) { var me = this , fields = record . getFields ( ) , idProperty = record . getIdProperty ( ) , uniqueIdStrategy = me . getUniqueIdStrategy ( ) , data = { } , name , value ; fields . each ( function ( field ) { if ( field . getPersist ( ) ) { name = field . getName ( ) ; if ( name === idProperty && ! uniqueIdStrategy ) { return ; } value = record . get ( name ) ; if ( field . getType ( ) . type == 'date' ) { value = me . writeDate ( field , value ) ; } data [ name ] = value ; } } , me ) ; return data ; }
Formats the data for each record before sending it to the server. This
method should be overridden to format the data in a way that differs from the default.
@param {Object} record The record that we are writing to the server.
@return {Object} An object literal of name/value keys to be written to the server.
By default this method returns the data property on the record.
Formats the data for each record before sending it to the server . This method should be overridden to format the data in a way that differs from the default .