Skip to content

Instantly share code, notes, and snippets.

@danfinlay
Created June 2, 2014 21:18
Show Gist options
  • Select an option

  • Save danfinlay/b99b375c003df510537a to your computer and use it in GitHub Desktop.

Select an option

Save danfinlay/b99b375c003df510537a to your computer and use it in GitHub Desktop.
Failing use case for the current Geddy Model eager-association branch
var Thing = geddy.model.AnyModelYouWant;
Thing.all({}, {limit:3}, function(err, things){
if(err) throw err;
var thingIds = things.map(function(t){return t.id;});
Thing.all({id: thingIds}, function(err, sameThings){
if(err) throw err;
assert(things.length === sameThings.length, "Querying an array of IDs should return the same number of things.");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment