Class PromiseManyArray
publicThis class is returned as the result of accessing an async hasMany relationship
on an instance of a Model extending from @ember-data/model
.
A PromiseManyArray is an array-like proxy that also proxies certain method calls to the underlying ManyArray in addition to being "promisified".
Right now we proxy:
reload()
createRecord()
This promise-proxy behavior is primarily to ensure that async relationship interact nicely with templates. In your JS code you should resolve the promise first.
const comments = await post.comments;
isFulfilled public
Defined in ../model/addon/-private/system/promise-many-array.ts:110
Whether the loading promise succeeded
isPending public
Defined in ../model/addon/-private/system/promise-many-array.ts:96
Whether the loading promise is still pending
isRejected public
Defined in ../model/addon/-private/system/promise-many-array.ts:103
Whether the loading promise rejected
isSettled public
Defined in ../model/addon/-private/system/promise-many-array.ts:117
Whether the loading promise completed (resolved or rejected)
length public
Defined in ../model/addon/-private/system/promise-many-array.ts:57
Retrieve the length of the content
links public
Defined in ../model/addon/-private/system/promise-many-array.ts:172
Retrieve the links for this relationship
meta public
Defined in ../model/addon/-private/system/promise-many-array.ts:182
Retrieve the meta for this relationship