Skip to content

Instantly share code, notes, and snippets.

@diurnalist
Created April 12, 2012 05:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diurnalist/2364707 to your computer and use it in GitHub Desktop.
Save diurnalist/2364707 to your computer and use it in GitHub Desktop.
Lightweight Relation Modeling with Backbone (6)
var Track = Backbone.Model.extend(),
TrackList = Backbone.Collection.extend({
model: Track
}),
Album = Backbone.RelationalModel.extend({
relations: {
trackList: TrackList
}
});​
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment