New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server side find with simple transform only returns one record #974

jacott opened this Issue Apr 22, 2013 · 2 comments


None yet
3 participants

jacott commented Apr 22, 2013

If the transform function does not return an object then only one record is returned.

if (Meteor.isServer) {
  var tbug = new Meteor.Collection('tbug');
  Meteor.startup(function () {
    tbug.insert({name: 'one'});
    tbug.insert({name: 'two'});

    console.log('DEBUG: transform bug only returns one id',tbug.find({},{
      transform: function (doc) {
        return doc._id;

This comment has been minimized.


glasser commented Apr 25, 2013

Thanks, fixed on devel.

@glasser glasser closed this Apr 25, 2013


This comment has been minimized.


avital commented Dec 3, 2013

A quick note: we have changed this behavior for the new Meteor UI rendering engine on the shark branch which will be merged to devel fairly soon. We now require that transform functions return objects. This significantly simplifies the bookkeeping required by the new implementation of {{#each}}.

See discussion on #1617.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment