Skip to content

Commit

Permalink
Merge pull request #809 from JasonKriss/terminology-cleanup
Browse files Browse the repository at this point in the history
Update to 'relationship' terminology
  • Loading branch information
stefanpenner committed Mar 17, 2013
2 parents df993ef + 49030f2 commit 398edf3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ARCHITECTURE.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ For example, a newly created record begins its life in the
returns its JSON hash. returns its JSON hash.


When a store materializes a record, it asks the adapter (see below) to When a store materializes a record, it asks the adapter (see below) to
extract the record's attributes and associations and normalize their extract the record's attributes and relationships and normalize their
names. This means that records will always have normalized data hashes. names. This means that records will always have normalized data hashes.


* Has a series of lifecycle flags (`isLoaded`, etc.) * Has a series of lifecycle flags (`isLoaded`, etc.)
Expand Down Expand Up @@ -128,13 +128,13 @@ features needed by its concrete implementations, described below.


### DS.ManyArray ### DS.ManyArray


Represents a one-to-many relationship. When the association is retrieved Represents a one-to-many relationship. When the relationship is
from a record, a `ManyArray` is created that contains an array of the retrieved from a record, a `ManyArray` is created that contains an
client IDs that belong to that record. array of the client IDs that belong to that record.


* Notifies the transaction if the relationship is modified * Notifies the transaction if the relationship is modified
* Tracks aggregate state of member records via `isLoaded` flag * Tracks aggregate state of member records via `isLoaded` flag
* Updates added records to point their inverse association to the new * Updates added records to point their inverse relationship to the new
parent. parent.


### DS.AdapterPopulatedRecordArray ### DS.AdapterPopulatedRecordArray
Expand Down Expand Up @@ -216,7 +216,7 @@ determine whether the ID can be generated on the client. If so, it will
apply the generated ID to the record immediately. apply the generated ID to the record immediately.


One major benefit of generating IDs on the client is that records do not One major benefit of generating IDs on the client is that records do not
need to wait for associated records to be saved in order to retrieve need to wait for related records to be saved in order to retrieve
their foreign keys. their foreign keys.


#### Naming Conventions #### Naming Conventions
Expand All @@ -228,7 +228,7 @@ In general, this means converting underscored names to camelcased names.


It is also responsible for converting dirty records into a data hash It is also responsible for converting dirty records into a data hash
expected by the server. For example, the adapter may need to add a expected by the server. For example, the adapter may need to add a
foreign key to the data hash by adding `_id` to its association. foreign key to the data hash by adding `_id` to its relationship.


The abstract adapter class provides normalization functions that call The abstract adapter class provides normalization functions that call
into the `namingConvention` hash in the concrete classes. For very into the `namingConvention` hash in the concrete classes. For very
Expand Down

0 comments on commit 398edf3

Please sign in to comment.