Skip to content

Commit

Permalink
0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Mar 6, 2016
1 parent 260b03f commit 7d3dc44
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
##### 0.1.2 - 06 March 2016

Added makeHasManyForeignKeys

##### 0.1.1 - 06 March 2016

Fixed a comment. Upgraded js-data-repo-tools.
Expand Down
14 changes: 14 additions & 0 deletions dist/js-data-adapter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-data-adapter",
"description": "Base adapter class that all other js-data adapters extend.",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/js-data/js-data-adapter",
"repository": {
"type": "git",
Expand All @@ -19,7 +19,7 @@
"parser": "babel-eslint"
},
"scripts": {
"lint": "repo-tools lint src/index.js",
"lint": "repo-tools lint src/index.js rollup.config.js",
"bundle": "rollup -c rollup.config.js -f umd -o dist/js-data-adapter.js -m dist/js-data-adapter.js.map src/index.js",
"watch": "watch \"npm run bundle\" src/",
"test": "npm run lint && npm run bundle",
Expand Down
13 changes: 13 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,19 @@ addHiddenPropsToTarget(Adapter.prototype, {
return def.getForeignKey(record)
},

/**
* Return the foreignKeys from the given record for the provided relationship.
*
* Override with care.
*
* @name Adapter#makeHasManyForeignKeys
* @method
* @return {*}
*/
makeHasManyForeignKeys (mapper, def, record) {
return get(record, mapper.idAttribute)
},

/**
* Load a hasMany relationship.
*
Expand Down

0 comments on commit 7d3dc44

Please sign in to comment.