This guide covers migrating Ember Data models from the legacy syntax to the modern one.
Useful docs:
Table of Contents
- Overview
- Basic Migration Pattern
- Attributes Migration
- Relationships Migration
- Computed Properties Migration
- Testing Migrated Models
- Complete Example
- Best Practices
Overview
The migration involves converting from:
-
DS.Model.extend({...})→export default class ModelName extends Model -
attr()→@attr()decorator -
belongsTo()→@belongsTo()decorator -
hasMany()→@hasMany()decorator












Top comments (0)