home
  • Blog
  • Home
  • Projects
    • Ember
    • EmberData
    • Ember CLI
3.28
  • Packages
    • @ember-data/adapter
    • @ember-data/adapter/error
    • @ember-data/adapter/json-api
    • @ember-data/adapter/rest
    • @ember-data/canary-features
    • @ember-data/debug
    • @ember-data/deprecations
    • @ember-data/model
    • @ember-data/record-data
    • @ember-data/serializer
    • @ember-data/serializer/json
    • @ember-data/serializer/json-api
    • @ember-data/serializer/rest
    • @ember-data/store
  • Classes
    • AbortError
    • Adapter
    • AdapterError
    • AdapterPopulatedRecordArray
    • BelongsToReference
    • BooleanTransform
    • BuildURLMixin
    • ConflictError
    • DateTransform
    • EmbeddedRecordsMixin
    • Errors
    • ForbiddenError
    • HasManyReference
    • IdentifierCache
    • InvalidError
    • JSONAPIAdapter
    • JSONAPISerializer
    • JSONSerializer
    • ManyArray
    • MinimumAdapterInterface
    • MinimumSerializerInterface
    • Model
    • NotFoundError
    • NumberTransform
    • PromiseArray
    • PromiseManyArray
    • PromiseObject
    • RESTAdapter
    • RESTSerializer
    • RecordArray
    • RecordDataDefault
    • RecordDataStoreWrapper
    • RecordReference
    • Reference
    • Serializer
    • ServerError
    • Snapshot
    • SnapshotRecordArray
    • StableRecordIdentifier
    • Store
    • StringTransform
    • TimeoutError
    • Transform
    • UnauthorizedError

Class PromiseManyArray public


Defined in: ../model/addon/-private/system/promise-many-array.ts:14
Module: @ember-data/model

This 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;


Methods

catch (callback) : public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:140

callback
returns

Promise

catch errors thrown by this promise

finally (callback) : public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:151

callback
returns

Promise

run cleanup after this promise completes

reload (options) : public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:194

options
returns

Reload the relationship

then (success, fail) : public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:127

success
fail
returns

Promise

chain this promise

Properties

isFulfilled public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:112

Whether the loading promise succeeded

isPending public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:98

Whether the loading promise is still pending

isRejected public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:105

Whether the loading promise rejected

isSettled public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:119

Whether the loading promise completed (resolved or rejected)

length public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:59

Retrieve the length of the content

links public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:174

Retrieve the links for this relationship

meta public

Module: @ember-data/model

Defined in ../model/addon/-private/system/promise-many-array.ts:184

Retrieve the meta for this relationship

On this page


Methods

  • catch
  • finally
  • reload
  • then

Properties

  • isFulfilled
  • isPending
  • isRejected
  • isSettled
  • length
  • links
  • meta
Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2025 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue Created with Sketch.