Created
January 28, 2011 00:00
-
-
Save kuon/799564 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_findRecord: function(recordType, id) { | |
var storeKey ; | |
// if a record instance is passed, simply use the storeKey. This allows | |
// you to pass a record from a chained store to get the same record in the | |
// current store. | |
if (recordType && recordType.get && recordType.get('isRecord')) { | |
storeKey = recordType.get('storeKey'); | |
// otherwise, lookup the storeKey for the passed id. look in subclasses | |
// as well. | |
} else storeKey = id ? recordType.storeKeyFor(id) : null; | |
if (storeKey && (this.readStatus(storeKey) === SC.Record.EMPTY)) { | |
storeKey = this.retrieveRecord(recordType, id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment