Skip to content
This repository
Browse code

switched the order of hasOne and belongsTo

  • Loading branch information...
commit 5217d746c33d0f23037827eb3ae0322fdf9dfd6f 1 parent d5db1e6
Trevor Borg tborg authored

Showing 1 changed file with 12 additions and 12 deletions. Show diff stats Hide diff stats

  1. +12 12 README.md
24 README.md
Source Rendered
@@ -142,18 +142,6 @@ DS.Model.extend({
142 142 Models can be associated with other models. Ember Data includes several
143 143 built-in types to help you define how your models relate to each other.
144 144
145   -#### Has One
146   -
147   -Previously, the `DS.hasOne` and `DS.belongsTo` associations were aliased
148   -to one another. Now, `DS.belongsTo` remains but `DS.hasOne` has been
149   -removed. We are planning on having different semantics for `DS.hasOne`
150   -at a later date.
151   -
152   -Primarily, the semantic difference between the two are related to which
153   -record should be marked as dirty when the relationship changes. To
154   -ensure that the semantics of your application match the framework,
155   -please ensure that you are using `DS.belongsTo` at this time.
156   -
157 145 #### Belongs To
158 146
159 147 `belongsTo` sets up a one-to-one relationship from one model to
@@ -176,6 +164,18 @@ App.Author = DS.Model.extend({
176 164 For now, please make sure you are using `belongsTo` on both ends of
177 165 one-to-one relationships, and not `hasOne`.
178 166
  167 +#### Has One
  168 +
  169 +Previously, the `DS.hasOne` and `DS.belongsTo` associations were aliased
  170 +to one another. Now, `DS.belongsTo` remains but `DS.hasOne` has been
  171 +removed. We are planning on having different semantics for `DS.hasOne`
  172 +at a later date.
  173 +
  174 +Primarily, the semantic difference between the two are related to which
  175 +record should be marked as dirty when the relationship changes. To
  176 +ensure that the semantics of your application match the framework,
  177 +please ensure that you are using `DS.belongsTo` at this time.
  178 +
179 179 #### Has Many
180 180
181 181 Use the `hasMany()` method to describe a relationship where multiple models belong

0 comments on commit 5217d74

Please sign in to comment.
Something went wrong with that request. Please try again.