Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: olawiberg/data
head fork: olawiberg/data
Checking mergeability… Don't worry, you can still create the pull request.
Commits on Jun 28, 2012
tomhuda Make async helper global to tests 2e8f351
tomhuda Clean up Ember.Application integration test c7fc4dd
Commits on Jul 18, 2012
Tomhuda Katzdale Prep for moving waitingOn to adapter
This commit starts us down the path of moving the
logic for pending/waitingOn into the adapter.
Tomhuda Katzdale Update ember 7946198
Tomhuda Katzdale Stop segregating transaction records by type e746102
Tomhuda Katzdale WIP on moving relationships to adapter
This commit is a work-in-progress on our work to
separate out the semantics between dirty records
and changes to their relationships.


1) DS.Model#toJSON() now accepts more arguments to
change how it serializes relationships
2) WIP on adapters being more active participants
in deciding what records need to be committed
3) Changed belongsTo attributes no longer write
ids to the record's data proxy
4) Records can be moved from the loaded.saved
state to a new relationshipsInFlight state. This
means that the record has changed relationships
but not changed attributes that need to be
5) Transaction now includes records that are not
dirty but have changed relationships when calling
an adapter's `commit` method (in the `updated`
array of records)
Tomhuda Katzdale Remove pending stuff b8e2126
tomhuda WIP do more stuff in the adapter
The most important change here is that filters now
materialize records.

This is necessary because the records no longer
store their backing data as a serialized hash.

The long-term perfz plan (for situations with huge
numbers of data hashes) is to integrate with
something like crossfilter to filter out unneeded
records before loading into the store.
tomhuda Consolidate and update filter tests
Add new tests for computed properties and state
flags for filtering.

Note that only computed properties that depend on
attributes can be used in a filter.
tomhuda Remove duplicate tests fd3a8ea
tomhuda Add serialization object 1beadd7
tomhuda Ensure QUnit module for automated JSHint tests 824a465
tomhuda Add warning for unimplemented adapter methods ffdfad7
tomhuda Rearrange adapter file structure 81c2b3a
tomhuda Break apart materialize a93ae6d
tomhuda Update tests to use adapter's toJSON method 8b2fc1b
tomhuda Change semantics for reporting unloaded attributes
Previously, if a record was not yet loaded,
retrieving an attribute would return null. Now,
undefined is returned instead.
tomhuda Continue firming up the adapter<=>record API 91ff6f3
tomhuda Encapsulate serialization and deserialization
Previously, concerns about how key names
for given hashes returned from the server were
spread across several different objects.

Now, the serialization and materialization
(converting an opaque data hash returned from
the server into meaningful results for Ember Data)
are handled by the DS.Serializer object.

Instead of jamming this responsibility into the
adapter, like so many clowns in a clown car, the
adapter is now solely responsible for deciding
which records should be committed, loading
records, and notifying the store of changes in
to record state.
tomhuda Move `adapter.js` to `system` directory e42ac0b
tomhuda Move serialization test to `integration` directory 4d299d4
tomhuda Extract materialization tests and add some more 070e122
tomhuda Only extract IDs from hashes if none exists 747c97b
tomhuda Materialized attributes should be transformed 71160ed
tomhuda Add materializeAttribute convenience 58ad6fb
tomhuda Remove toJSON code from DS.Model 4e17fef
tomhuda Add attributes transformations to serializer 8a6e33f
tomhuda Added mapping for attributes and associations 51e9423
tomhuda Add an assert for setting `id` as an attribute bfdc0ca
tomhuda Add primaryKey mapping 61faaf7
tomhuda Get tests passing 2eb1a0d
Commits on Jul 25, 2012
tomhuda Extract query, find and association tests 35f134a
tomhuda Add `didLoad` event to AdapterPopulatedRecordArray 839e413
tomhuda Split find and findAll tests
This commit also adds an invokeAsync helper
for invoking a callback after a specified
interval, while not screwing up QUnit tests.
Commits on Jul 26, 2012
tomhuda Extract client ID generation tests b84a0f3
tomhuda Extract record persistence tests 80196c5
tomhuda Extract association/findMany test 5a07a1b
tomhuda WIP on extracting DS.Adapter unit tests 570bafc
tomhuda Clean up Ember.Application ext tests 8ff8336
tomhuda Demonolithize test harness index.html 002a57a
Commits on Jul 27, 2012
tomhuda Prevents redundant adapter `commit` calls
If DS.Transaction doesn't have any dirty records,
don't call the adapter's `commit` method.
tomhuda WIP on decoupling store and adapter tests. fd4b5a7
tomhuda Rename test_helpers to ember_configuration 1429d02
tomhuda Add real test helpers 8f0c678
tomhuda Better store adapter callback tests 07d6258
tomhuda Rename DS.StubModel to DS.MockModel bc9f501
tomhuda Allows registering transforms on adapter classes 3fba75a
Commits on Jul 28, 2012
tomhuda Mappings should support string arguments 6babd30
Commits on Jul 30, 2012
tomhuda Add DS.Adapter class-level mapping registration 3ed9888
Commits on Jul 31, 2012
tomhuda Do not re-use serializer object between adapters 3c3f02b
tomhuda Adds integration test for adapter-level mapping 9cb5504
tomhuda Change test due to non-deterministic == operator
In recent versions of Chrome developer channel and
Canary, an apparent V8 optimization was causing
this test to fail because `null == undefined`
was occasionally returning false.

Since no one on the Chrome team seemed to care
very much, we just changed the test. :trollface:
Commits on Aug 01, 2012
tomhuda Resolve work on setting up the merge

tomhuda Merge branch 'master' into relationship-improvements
tomhuda Setup inverse relationship when setting belongsTo f55b678
tomhuda Remove registerTransform from store 4baf061
Commits on Aug 04, 2012
tomhuda WIP move relationship logic into OneToManyLink 17b24b3
Commits on Aug 06, 2012
Tom Dale Remove deprecated DATA_PROXY stub 42418a8
Tom Dale Adds documentation to materializeData bda9d47
Commits on Aug 12, 2012
tomhuda Adds additional features to make all test pass
- More permutations of relationship changes are
  handled by OneToManyChange
- Records now have "dirtiness factors," which describe
  what changes made a record dirty
- Records are guaranteed to be in the same
  transaction when changing relationships.
- ManyArray's `isDirty` property has been
  eliminated, as well as the state manager
  driving it.
tomhuda Add didLoad event to ManyArray
- Make all RecordArrays Ember.Evented
- Make all RecordArrays have isLoaded
- Make FilteredArray always isLoaded
- Add didLoad event to ManyArray
Commits on Aug 13, 2012
tomhuda Herp derpin' away 15e31cf
Commits on Aug 14, 2012
tomhuda Update Ember with suspendObservers logic 40196fb
tomhuda Improve logic for ensuring same transaction 7223515
tomhuda Fix a bug involving ArrayProxy hooks 7c080df
tomhuda Make rollback work with associations
During materialization or rollback, suspend
belongsTo observers. This avoids creating
change records, which should only be created
for changes initiated by the application, not by
the adapter or by a transaction.
Commits on Aug 15, 2012
tomhuda Update Ember 89ecd9f
tomhuda Fixed bugs with rolling back relationship changes 019ea76
tomhuda Implements shouldCommit for REST adapter
- In the REST adapter, only commit records that
  are dirty due to an attribute change or because
  a belongsTo relationship changed.
- Splits the adapter's `commit()` method into
  an internal `commit()` and a public `save()`
- Adds a `fields` property on the DS.Model class,
  which returns an Ember.Map of both attributes
  and relationships.
- Adds dirty reasons. This allows you to query
  a model for more granularity than just whether
  it is dirty or not—you can ask, for example,
  if `record.isDirtyBecause('attribute')` to
  determine if a record is dirty due to an
  attribute being changed.
- Transactions now pass relationships into an
  adapter's `commit()` method, in addition to
  created, updated, and deleted records.
Commits on Aug 16, 2012
@lukemelia lukemelia Fix mispeling of committed that cauzes errers ac14060
Commits on Aug 17, 2012
tomhuda Only register injections once per Ember load ac36f45
@wagenet wagenet Merge pull request #364 from lukemelia/committed-spelling-fix
Fix mispeling of committed that cauzes errers
Commits on Aug 18, 2012
tomhuda Deal with deletion situation
It turned out to be possible for a relationship
change to exist even if no child record existed.

This happened if a parent with unmaterialized
children was deleted. Because of this situation,
we needed to make the relationship change objects
more standalone, and change the infrastructure to
use clientIds internally instead of expecting at
least the child to be materialized.

This change is somewhat destabilizing, and I
realized that he don't have coverage of
didSaveRecord(<no hash>), but it's necessary.

This change also makes several public methods on
OneToManyChange, which is passed to the adapter,
and requires that adapters acknowledge updates to
the relationships, because of the possibility that
a relationship change can need to be persisted
even if the associated record is not loaded (i.e.
the above deletion case).
Commits on Aug 25, 2012
@wycats wycats Make commitDetails a series of OrderedSets
This makes it efficient for adapters to do
presence checks.
@wycats wycats Cleanup cfe73df
@wycats wycats Don't materialize newly created records
This triggers an unnecessary materialization from
a hash that will always be empty.
@wycats wycats Avoid materializing newly created records
Don't trigger materialization on the adapter when
`data` is looked up on a record if the record was
newly created.
Commits on Aug 26, 2012
@wycats wycats Significantly improve docs and cleanup
In the course of doing documentation work, I also
found some obsolete naming or areas where naming
improvements helped make the code match the docs.
@wycats wycats Some more DS.Store docs 043e22c
Commits on Aug 27, 2012
@wycats wycats Fix typo (thx @sly7-7) 549d3a3
Commits on Sep 26, 2012
@wagenet wagenet Merge branch 'master' into relationship-improvements
@wagenet wagenet Updated tests to jQuery 1.8.2 bf58e9c
@wagenet wagenet Fixed failing tests in phantomjs 1aab328
Commits on Sep 27, 2012
@tomdale tomdale Always coerce IDs into strings. 1b0ee50
Commits on Oct 02, 2012
@olawiberg Setting Content-type based on HTTP method type. Use default JQuery ty…
…pe for GET and DELETE and application/json for PUT and POST.