You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
},`Assertion Failed: We found no inverse relationships by the name of 'chapters' on the 'book1' model. This is most likely due to a missing attribute on your model definition.`);
2106
-
2107
-
//Update setup
2108
-
// with inverse set to null
2109
-
// no errors thrown
2110
-
Chapter.reopen({
2111
-
book1: DS.belongsTo({async: false}),
2112
-
sections: DS.hasMany('section',{async: false}),
2113
-
book: DS.belongsTo({async: false,inverse: null}),
2114
-
});
2115
-
2116
-
run(()=>{
2117
-
store.push(data);
2118
-
});
2119
-
2120
-
letchapter=store.peekRecord('chapter','1');
2121
-
letbook1=store.peekRecord('book1','1');
2122
-
letbook2=store.peekRecord('book1','2');
2123
-
letbook=store.peekRecord('book','1');
2124
-
letsection1=store.peekRecord('section','1');
2125
-
letsection2=store.peekRecord('section','2');
2126
-
2127
-
letsections=chapter.get('sections');
2128
-
2129
-
assert.equal(chapter.get('book1.id'),'1');
2130
-
assert.equal(chapter.get('book2.id'),'2');
2131
-
assert.equal(chapter.get('book.id'),'1');
2132
-
2133
-
// No inverse setup created for book1
2134
-
// as Model-Data of book1 doesn't support this
2135
-
// functionality.
2136
-
assert.notOk(book1.get('chapter'));
2137
-
assert.notOk(book2.get('chapter'));
2138
-
assert.notOk(book.get('chapter'));
2139
-
assert.notOk(
2140
-
recordDataFor(book1)._implicitRelationships,
2141
-
'no support for implicit relationship in custom RecordData'
2142
-
);
2143
-
assert.notOk(
2144
-
recordDataFor(book2)._implicitRelationships,
2145
-
'no support for implicit relationship in custom RecordData'
2146
-
);
2147
-
assert.ok(recordDataFor(book)._implicitRelationships,'support for implicit relationship in default RecordData');
0 commit comments