psteininger / ember-data-save-relationships Goto Github PK
View Code? Open in Web Editor NEWThis project forked from frank06/ember-data-save-relationships
A mixin for Ember Data JSON API serializers to save relationship data
License: MIT License
This project forked from frank06/ember-data-save-relationships
A mixin for Ember Data JSON API serializers to save relationship data
License: MIT License
I saw here than there is an __id__
attribute assigned to the object. In my case, this cause an error on the server side because this is not a valid attribute. To fix it, I did this code :
import DS from 'ember-data';
import SaveRelationshipsMixin from 'ember-data-save-relationships';
export default DS.JSONAPISerializer.extend(SaveRelationshipsMixin, {
serializeRecord(obj) {
const serialized = this._super(...arguments);
delete serialized.attributes.__id__;
return serialized;
}
});
And it seems to works well. I think it's safe to remove it in the addon. What do you think?
I'm working on a app built with Ember 3.5 and, when I save a new record, I have the error "record._internalModel.flushChangedAttributes is not a function". I suppose this is an old function and it had been removed but I didn't found it, even in old versions of ember.
By the way, is there a plan to support Ember 3 officially?
I can see one open PR #12
without any response, doesn't seem like its maintained anymore
Any alternatives to this package? Can't find another addon to save relationships
Currently things break on the backend of Phoenix with ja_resource, if the relationship.name.data
is null
. Defaulting it to empty array fixes the problem []
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.