EntitySpaces / entityspaces.js

A JavaScript Data Access Framework that uses Knockout
www.entityspaces.net
36 stars 11 forks source link

RowStateEnum isn't defined #4

Closed ghost closed 12 years ago

ghost commented 12 years ago

Changed markAsDeleted from :

        this.markAsDeleted = function () {
        var entity = this;

        if (!entity.hasOwnProperty("RowState")) {
            entity.RowState = ko.observable(es.RowStateEnum.deleted);
        } else if (entity.RowState() !== es.RowStateEnum.deleted) {
            entity.RowState(es.RowStateEnum.deleted);
        }

        if (entity.hasOwnProperty("ModifiedColumns")) {
            entity.ModifiedColumns.removeAll();
        }
    };

to:

     this.markAsDeleted = function () {
        var entity = this;

        if (!entity.hasOwnProperty("RowState")) {
            entity.RowState = ko.observable(es.RowState.DELETED);
        } else if (entity.RowState() !== es.RowState.DELETED) {
            entity.RowState(es.RowState.DELETED);
        }

        if (entity.hasOwnProperty("ModifiedColumns")) {
            entity.ModifiedColumns.removeAll();
        }
    };
EntitySpaces commented 12 years ago

Thank you, good catch, this has been fixed