Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Created March 6, 2010 04:58
Show Gist options
  • Select an option

  • Save tim-smart/323506 to your computer and use it in GitHub Desktop.

Select an option

Save tim-smart/323506 to your computer and use it in GitHub Desktop.
var Post = function Post() {
ORM.prototype.constructor.apply(this, arguments);
};
Post.prototype = Object.create(ORM.prototype);
Post.belongsTo = ['article'];
Post.hasMany = ['comments'];
// Alternate name
Post.resource = 'post';
Post.prototype.title = "Hello World!";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment