
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@ember-data-mirror/model
Advanced tools
A basic Ember implementation of a resource presentation layer for use with @ember-data-mirror/store
WarpDrive is the lightweight data library for web apps —
universal, typed, reactive, and ready to scale.
Runtime classes for use as a source of ResourceSchema and as a ReactiveResource for older "legacy" EmberData/WarpDrive configurations.
If using more recent versions of WarpDrive, install this via @warp-drive-mirror/legacy instead.
Tagged Releases
This package implements the EmberData Store's instantiateRecord and teardownRecord hooks
as well as configures an associated SchemaService implementation.
Models are defined as classes extending from import Model from '@ember-data-mirror/model'; and the
attributes and relationships on these classes are parsed at runtime to supply static "schema"
to EmberData's SchemaService.
Resource data for individual resources fetched from your API is presented to the UI via instances
of the Models you define. An instantiated Model is referred to as a record.
When we refer to the ModelClass as opposed to a Model or Record we are referring
specifically to the class definition and the static schema methods present on it.
When we refer to a record we refer to a specific class instance presenting
the resource data for a given type and id.
app/models/person.js
import Model, { attr, belongsTo, hasMany } from '@ember-data-mirror/model';
export default class PersonModel extends Model {
@attr name;
@belongsTo('pet', { inverse: 'owners', async: false }) dog;
@hasMany('person', { inverse: 'friends', async: true }) friends;
}
By convention, the name of a given model (its type) matches the name
of the file in the app/models folder and should be lowercase, singular
and dasherized.
FAQs
A basic Ember implementation of a resource presentation layer for use with @ember-data-mirror/store
The npm package @ember-data-mirror/model receives a total of 499 weekly downloads. As such, @ember-data-mirror/model popularity was classified as not popular.
We found that @ember-data-mirror/model demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.