Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
モデルを店舗に割り当てて電話する
var model = Store.create({id:0,firstName:"john",lastName:"smith",department:"sales"}); model.save();
これにより、PUT 要求が送信されます。POSTを送信するべきではありませんか?id フィールドを含めないようにしましたが、検証エラーがスローされます。私が間違っていることはありますか?
IDを送信してPOSTさせることはできないようです。これを行う最善の方法は、次のいずれかです
var model = Store.create({firstName: "john", lastName: "smith", department: "sales"}); Store.add(model);
また
var model = new MyModel({firstName: "john", lastName: "smith", department: "sales"}); Store.add(model);