lib/database.js
function(name, properties) {
    var className = _.capitalize(_.camelCase(name));
    var known = this._modelClasses;
    var model = known[className];
    if (!model) {
      model = known[className] =
        this.Model.extend({}, { __name__: className });
    }
    return model.reopen(properties);
  }
function(name, properties) {
    var className = _.capitalize(_.camelCase(name));
    var known = this._modelClasses;
    var model = known[className];
    if (!model) {
      model = known[className] =
        this.Model.extend({}, { __name__: className });
    }
    return model.reopen(properties);
  }
function ( name , properties ) { var className = _ . capitalize ( _ . camelCase ( name ) ) ; var known = this . _modelClasses ; var model = known [ className ] ; if ( ! model ) { model = known [ className ] = this . Model . extend ( { } , { __name__ : className } ) ; } return model . reopen ( properties ) ; }
Create a new model class or retrieve an existing class.

This is the preferred way of creating new model classes as it also stores
the model class by name, allowing you to use strings in certain places to
refer to classes (i.e. when defining relationships).

@param {String} name The name for the class
@param {Object} [properties] Properties to add to the class
@return {Class} The model class
Create a new model class or retrieve an existing class .