Last active
October 19, 2015 22:02
-
-
Save crobinson42/40d73b1639a2a20c827d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var store = new JSData.DS(); | |
store.registerAdapter('http', new DSHttpAdapter(), { default: true }); | |
var User = store.defineResource({ | |
name : 'user', | |
bypassCache : true, | |
relations: { | |
hasMany: { | |
item: { | |
localField: 'items', | |
foreignKey: 'users' | |
} | |
} | |
} | |
}); | |
var Item = store.defineResource({ | |
name: 'item', | |
relations: { | |
hasMany: { | |
user: { | |
localField: 'users', | |
foreignKey: 'items' | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment