Skip to content

Instantly share code, notes, and snippets.

@lukejagodzinski
Created January 5, 2016 11:55
Show Gist options
  • Save lukejagodzinski/5a3e5bcec3324e3000b0 to your computer and use it in GitHub Desktop.
Save lukejagodzinski/5a3e5bcec3324e3000b0 to your computer and use it in GitHub Desktop.
Article: Sorting with Relations in Meteor
User = Astro.Class({
name: 'User',
fields: {
name: 'string'
}
});
Posts = new Mongo.Collection('posts');
Post = Astro.Class({
name: 'Post',
collection: Posts,
fields: {
title: 'string'
author: {
type: 'object',
nested: 'User'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment