-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON-API + new serializers #283
Conversation
Minimizes the footprint of code by using as much of the underlying JSONSerializer methods as possible. The main point of difference is how `hasMany` relationships are stored. Now uses `EmbeddedRecordsMixin` for embedded record processing
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
- Serializer does not actually push into the store anymore so the integration parts are unnecessary - Moved the empty/undefined hasMany relationship code into the serializer - Cleaned up the unit test so it doesn't rely on the fixture data anymore
Even Just needs the embedded records stuff fixed up and we're good to go. |
Nice! I've tried looking at the embedded records but it goes way over my head, will keep looking! |
I've decided to make new models specifically for the embedding, trying to override embedding stuff inside each test was too cryptic and problematic. Should have something working by end of day :) |
Waiting on emberjs/data#3550 |
Oh wow, that was way more complex than I thought, glad that it's being resolved soon! Is there any other change left for either #267 or 2.0 compat milestone? |
Yeah, the way the new serializer stuff works you don't have access to the records anymore (it's for the best) .. but it sure made things a little crazy in the adapter :/ |
This will get us compatible with both 1.13.x and 2.0-canary If you want to help out any more, we could do with some more testing to work out if there are any edge cases in the embedded records stuff. I have tested the "basic" example for embedded records, but there could be things like when there are relationships defined in both directions i.e. Or just check out this branch, pair it with branch in emberjs/data#3550 and try a few things out with it (not necessarily embedded stuff) Tests in general will always be helpful in getting us over the line when 2.0 stable launches. Some of the new methods I wrote in the adapter need some checks and balances. And finally I do want to eventually move the |
Disabling embedded tests so that I can make an early release. the embedded stuff will need to wait for emberjs/data#3550 |
Might give a try to updating to Ember Data 1.13 later using this branch, will let you know if everything goes smoothly. |
Minimizes the footprint of code by using as much of the underlying
JSONSerializer
methods as possible.The main point of difference between the inherited code is how
hasMany
relationships are stored.Also uses
EmbeddedRecordsMixin
for embedded record processing. This will mean that setting theembedded
option in themodels/*
files will be deprecated. The new way forward will be to use a per type serializer withembedded: 'always'
as seen hereMerging #282 into this one while we iterate.