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.
有没有办法在使用 ember 数据存储 REST 适配器发送的“放置”请求中包含“有很多”模型?
您可以通过在适配器上定义嵌入记录
Comment = DS.Model.extend({ votes: DS.hasMany(Vote) }); Adapter.map(Comment, { votes: { embedded: 'always' } });
https://github.com/emberjs/data/blob/master/packages/ember-data/tests/integration/embedded/embedded_dirtying_test.js#L53