Rename discoverModels to discoverModelDefinitions

This commit is contained in:
Ritchie 2013-06-17 11:43:20 -07:00
parent 25f2920e95
commit d442c40f25
1 changed files with 7 additions and 7 deletions

View File

@ -258,6 +258,7 @@ DataSource.prototype.connector = function () {
* });
* ```
*/
DataSource.prototype.define = function defineClass(className, properties, settings) {
var args = slice.call(arguments);
@ -283,7 +284,6 @@ DataSource.prototype.define = function defineClass(className, properties, settin
}
return NewClass;
};
// alias createModel
@ -418,20 +418,20 @@ DataSource.prototype.autoupdate = function (cb) {
* limit: The page size
* offset: The starting index
*/
DataSource.prototype.discoverModels = function (options, cb) {
DataSource.prototype.discoverModelDefinitions = function (options, cb) {
this.freeze();
if (this.adapter.discoverModels) {
this.adapter.discoverModels(options, cb);
if (this.adapter.discoverModelDefinitions) {
this.adapter.discoverModelDefinitions(options, cb);
} else if (cb) {
cb();
}
};
DataSource.prototype.discoverModelsSync = function (options) {
DataSource.prototype.discoverModelDefinitionsSync = function (options) {
this.freeze();
if (this.adapter.discoverModelsSync) {
return this.adapter.discoverModelsSync(options);
if (this.adapter.discoverModelDefinitionsSync) {
return this.adapter.discoverModelDefinitionsSync(options);
}
return null;
};