Add API docs for the HasManyReference - #4642
Conversation
| comments: DS.hasMany({ async: true }) | ||
| }); | ||
|
|
||
| var post = store.push({ |
There was a problem hiding this comment.
not a valid format for store.push
| comments: DS.hasMany({ async: true }) | ||
| }); | ||
|
|
||
| var post = store.push({ |
There was a problem hiding this comment.
not a valid format for store.push
| }; | ||
|
|
||
| /** | ||
| The link Ember Data will use to fetch or reload this belongs-to |
| comments: DS.hasMany({ async: true }) | ||
| }); | ||
|
|
||
| var post = store.push({ |
There was a problem hiding this comment.
not a valid format for store.push
| comments: DS.hasMany({ async: true }) | ||
| }); | ||
|
|
||
| var post = store.push({ |
There was a problem hiding this comment.
not a valid format for store.push
|
|
||
| var commentsRef = post.hasMany('comments'); | ||
|
|
||
| commentsRef.value() === post.get('comments') |
There was a problem hiding this comment.
This code sample is not completely accurate. We should either make the relationship sync, or resolve the post.get("comments") and state that the resolved value is commentsRef.value().
I would prefer the promise version to indicate that references allow you synchronous access to an async relationship.
| comments: DS.hasMany({ async: true }) | ||
| }); | ||
|
|
||
| var post = store.push({ |
There was a problem hiding this comment.
not a valid format for store.push
| comments: DS.hasMany({ async: true }) | ||
| }); | ||
|
|
||
| var post = store.push({ |
There was a problem hiding this comment.
not a valid format for store.push
| }; | ||
|
|
||
| /** | ||
| The link Ember Data will use to fetch or reload this belongs-to |
| ``` | ||
|
|
||
| @method link | ||
| @return {String} The link Ember Data will use to fetch or reload this belongs-to relationship. |
d5b2d30 to
9cd5541
Compare
|
|
||
| Example | ||
|
|
||
| ```javascript |
There was a problem hiding this comment.
Can you split into
```app/models/post.js
```
and
```javascript
```
please?
9cd5541 to
00b664a
Compare
6ced946 to
dfa365c
Compare
dfa365c to
ae7e8ab
Compare
|
Thank much @bmac |
No description provided.