src/CRUD.js
function(field, def) {
        var ret;
        if (field in this.__dirtyValues__) {
            ret = this.__dirtyValues__[field];
        } else if (field in this.__values__) {
            ret = this.__values__[field];
        } else if (CRUD.EntityManager.entities[this.getType()].fields.indexOf(field) > -1) {
            ret = (field in CRUD.EntityManager.entities[this.getType()].defaultValues) ? CRUD.EntityManager.entities[this.getType()].defaultValues[field] : null;
        } else {
            CRUD.log('Could not find field \'' + field + '\' in \'' + this.getType() + '\' (for get)');
        }
        return ret;
    }
function(field, def) {
        var ret;
        if (field in this.__dirtyValues__) {
            ret = this.__dirtyValues__[field];
        } else if (field in this.__values__) {
            ret = this.__values__[field];
        } else if (CRUD.EntityManager.entities[this.getType()].fields.indexOf(field) > -1) {
            ret = (field in CRUD.EntityManager.entities[this.getType()].defaultValues) ? CRUD.EntityManager.entities[this.getType()].defaultValues[field] : null;
        } else {
            CRUD.log('Could not find field \'' + field + '\' in \'' + this.getType() + '\' (for get)');
        }
        return ret;
    }
function ( field , def ) { var ret ; if ( field in this . __dirtyValues__ ) { ret = this . __dirtyValues__ [ field ] ; } else if ( field in this . __values__ ) { ret = this . __values__ [ field ] ; } else if ( CRUD . EntityManager . entities [ this . getType ( ) ] . fields . indexOf ( field ) > - 1 ) { ret = ( field in CRUD . EntityManager . entities [ this . getType ( ) ] . defaultValues ) ? CRUD . EntityManager . entities [ this . getType ( ) ] . defaultValues [ field ] : null ; } else { CRUD . log ( 'Could not find field \'' + field + '\' in \'' + this . getType ( ) + '\' (for get)' ) ; } return ret ; }
Accessor. Gets one field, optionally returns the default value.
Accessor . Gets one field optionally returns the default value .