1
나는 엠버 데이터와 첫 hasMany의 관계를하고 공격있어이 보통 내가이 "엠"친숙한 형식으로 부르는에서 JSON 구조가없는 것을 의미엠버 데이터 "findMany"가 사이드로드해야하는 json 구조는 무엇입니까?
"Uncaught Error: assertion failed: Your server returned a hash with the key 0 but you have no mappings"
항상 재미.
장고 rest 프레임 워크를 사용하여 django 용 REST 어댑터를 직접 구축하고 있으므로 사이드로드에 오류가 없는지 궁금합니다.
현재 돌아 오는 JSON은 아래 (다시 분명히 어떤 넥타이 세션입니다하지만 어쩌면 타다가 이미이를 묶는 방법을 알고?)[{"id": 2, "name": "FooBar"}]
모델이
CodeCamp.Session = DS.Model.extend({
id: DS.attr('number'),
name: DS.attr('string'),
room: DS.attr('string'),
desc: DS.attr('string')
});
CodeCamp.Speaker = DS.Model.extend({
id: DS.attr('number'),
name: DS.attr('string'),
session: DS.belongsTo('CodeCamp.Session')
});
CodeCamp.Session.reopen({
speakers: DS.hasMany('CodeCamp.Speaker')
});
모습처럼 보인다
는