Jason Dobry
Jason Dobry
For the foreseeable future, this falls outside of the scope of js-data.js Recipes or examples may be in order, so I will keep this issue but change its scope.
You could do this: ``` js class SongRecord { get compoundId() { return this.albumID + '_' + this.trackNumber; } } const SongModel = DS.defineResource({ name: 'song', idAttribute: 'compoundId', useClass: SongRecord...
Have you tried any approaches with JSData 3.x?
Would you be able to put together a Plunker that shows what you're trying to accomplish, and perhaps I can make it work for you?
I updated my example from https://github.com/js-data/js-data/issues/392#issuecomment-239216142 for v3: ```js const SongSchema = new Schema({ type: 'object', properties: { compoundId: { type: 'string', get () { return `${this.albumID}_${this.trackNumber}`; } }, albumId:...
I don't have much experience with React, but it's been on my todo list to investigate how well js-data plays with the Flux architecture, specifically the immutable data and dispatcher...
> I need to detect if there is change js-data keeps track of a lastModified timestamp for every item in the store as well as a timestamp for each collection...
@SimonDegraeve Were you able to give my example a try?
@mzabriskie @SimonDegraeve I made a demo app that uses [js-data + js-data-firebase + React](https://js-data-firebase.firebaseapp.com/react/). Disclaimer: I have no idea what I'm doing when it comes to React.
I know a little bit better now what I'm doing with React, so here's an example project that uses React + js-data to great effect: https://github.com/jmdobry/RequelPro/tree/master/src/RequelPro