ember.js - Ember Data: Can I add extra properties when persisting data? -
there's route on our api create production
post /productions
. have option of passing project_id
property body attach production project in 1 go. request looks follows:
// post /productions { title: "production title", goal_date: "2015-04-30 01:37:03", project_id: "prj_hash123" }
when store.createrecord('production', { title: "production title", ... });
, project_id
property stripped off , not sent save()
. there way using ember data send along request property?
note: have tried modifying restserializer.serialize
method, project_id property
doesn't make there. assume because it's not defined on model, it's stripped when createrecord
called.
Comments
Post a Comment