Skip to content

Instantly share code, notes, and snippets.

@pixelcort
Created June 6, 2009 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pixelcort/124600 to your computer and use it in GitHub Desktop.
Save pixelcort/124600 to your computer and use it in GitHub Desktop.
Shared.Asset = SC.Record.extend({
title: SC.Record.attr(String),
kind: SC.Record.attr(String),
placements: SC.Record.toMany("Shared.Placement"),
});
Shared.Placement = SC.Record.extend({
asset: SC.Record.attr(Shared.Asset),
location: SC.Record.attr(Number),
});
asset1 = Shared.store.createRecord(Shared.Asset, {title: "Test Asset",kind:"text/plain"});
placement1 = Shared.store.createRecord(Shared.Placement, {location: 0, asset: asset1.storeKey});
placement1.get("asset").storeKey == asset1.storeKey; // Returns false. Should return true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment