Doc updates

This commit is contained in:
Ritchie 2013-06-20 10:17:55 -07:00
parent dff810f31c
commit 30247e71ed
2 changed files with 18 additions and 0 deletions

View File

@ -492,6 +492,23 @@ Synchronously Discover a set of models based on tables or collections in a data
var models = oracle.discoverAndBuildModelsSync('MYORG');
var ProductModel = models.Product;
#### dataSource.discoverModelDefinitions([owner], fn)
Discover a set of model definitions based on tables or collections in a data source.
oracle.discoverModelDefinitions(null, function (err, models) {
models.forEach(function (def) {
// def.name ~ the model name
oracle.discoverSchema(null, def.name, function (err, schema) {
console.log(schema);
});
});
});
#### dataSource.discoverSchema([owner], name, fn)
Discover the schema of a data source.
#### dataSource.defineOperation(name, options, fn)

View File

@ -61,6 +61,7 @@ app._models = [];
app.model = function (Model) {
this._models.push(Model);
Model.shared = true;
Model.app = this;
if(Model._remoteHooks) {
Model._remoteHooks.emit('attached', app);