Skip to content

Instantly share code, notes, and snippets.

@devongovett
Forked from ThisIsMissEm/gist:480729
Created July 18, 2010 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devongovett/480747 to your computer and use it in GitHub Desktop.
Save devongovett/480747 to your computer and use it in GitHub Desktop.
Employee: new db.model ->
this.key "name", String, {required: true}
this.key "email", Email, {required: true}
this.hasOne "office"
this.hasMany "data", {model: "Datum"}
return this
Employee = new db.Model(function() {
this.key("name", String, { required: true });
this.key("email", String);
this.hasMany("Office");
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment