meteor/meteor — pull request #129 by tmeasday (2012-05-09 10:11:31+00:00)
Title: Allow attachment of classes (Models) to records returned from collections

NOTE: this is a 'github' style "exploration" PR---it isn't intended to be merged as is, but as a starting point for discussion towards implementing a feature.

I'd like to be able to use some kind of Model pattern for the data returned from `Collection` (either `minimongo` or from the `mongo_driver`). It was suggested on `#meteor` that you guys are thinking of allowing a Class to be specified when the collection is created and added to the prototype of objects as they are created.

So far in this PR I've implemented the bare minimum to allow this (locally):
```coffeescript
class Team
printName: -> console.log this.name

Teams = new Meteor.Collection 'teams', null, null, Team

Teams.findOne().printName()
```

So, my questions are:
1. Is this the approach you guys are thinking of using?
2. Is it going to work for me to implement it, or is it too tied into the inner workings of meteor?