Skip to content

Commit

Permalink
Stable Version 3.0.0-alpha.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Jan 6, 2016
1 parent bdad83d commit 0aea729
Show file tree
Hide file tree
Showing 15 changed files with 1,534 additions and 1,162 deletions.
852 changes: 487 additions & 365 deletions dist/js-data-debug.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js-data-debug.js.map

Large diffs are not rendered by default.

852 changes: 487 additions & 365 deletions dist/js-data.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/js-data.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js-data.min.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "js-data",
"description": "Robust, framework-agnostic in-memory data store.",
"version": "3.0.0-alpha.4",
"version": "3.0.0-alpha.5",
"homepage": "http://www.js-data.io",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/decorators/adapter.js
Expand Up @@ -18,7 +18,7 @@ export function registerAdapter (name, adapter, opts) {
return function (target) {
target.dbg(op, 'name:', name, 'adapter:', adapter, 'opts:', opts)
// Register the adapter
target.adapters[name] = adapter
target.getAdapters()[name] = adapter
// Optionally make it the default adapter for the target.
if (opts === true || opts.default) {
target.defaultAdapter = name
Expand Down
4 changes: 2 additions & 2 deletions src/decorators/belongsTo.js
Expand Up @@ -98,7 +98,7 @@ function applyBelongsTo (Model, Relation, opts) {
set (value) {
this._set(`props.${localKey}`, value)
if (this._get('$')) {
Model.collection.indexes[localKey].updateRecord(this, { index: localKey })
Model.getCollection().indexes[localKey].updateRecord(this, { index: localKey })
}
}
})
Expand All @@ -115,7 +115,7 @@ function applyBelongsTo (Model, Relation, opts) {
opts.Relation = Relation
Model.relationList.push(opts)
Model.relationFields.push(localField)
Model.collection.createIndex(localKey)
Model.getCollection().createIndex(localKey)

// Return target Model for chaining
return Model
Expand Down
2 changes: 1 addition & 1 deletion src/decorators/hasMany.js
Expand Up @@ -29,7 +29,7 @@ function applyHasMany (target, Relation, opts) {
foreignKey = opts.foreignKey = `${camelCase(target.name)}_id`
}
if (foreignKey) {
Relation.collection.createIndex(foreignKey)
Relation.getCollection().createIndex(foreignKey)
}

// Setup configuration of the property
Expand Down
2 changes: 1 addition & 1 deletion src/decorators/hasOne.js
Expand Up @@ -94,7 +94,7 @@ function applyHasOne (Model, Relation, opts) {
opts.Relation = Relation
Model.relationList.push(opts)
Model.relationFields.push(localField)
Model.collection.createIndex(foreignKey)
Model.getCollection().createIndex(foreignKey)

// Return target Model for chaining
return Model
Expand Down
2 changes: 1 addition & 1 deletion src/decorators/schema.js
Expand Up @@ -83,7 +83,7 @@ function makeDescriptor (target, key, opts) {
}
_set(`props.${key}`, value)
if (_get('$') && opts.indexed) {
target.collection.updateRecord(this, { index: key })
target.getCollection().updateRecord(this, { index: key })
}
return value
}
Expand Down

0 comments on commit 0aea729

Please sign in to comment.