Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Small ORM to enhance Backbone.js models
JavaScript CoffeeScript
Branch: master
Failed to load latest commit information.
README.markdown Edited README.markdown via GitHub
backbone-orm.coffee First commit
backbone-orm.js add a js compiled version

README.markdown

https://github.com/PaulUithol/Backbone-relational looks like a cleaner approach. It relies on the same basic stuff, a model store to keep track globally of model instances.

Example in coffeescript:

this.Foreman = Backbone.Model.extend
    initialize: -> 
        # will add a projects attribute to the foreman and a foreman attribute to the project
        _.extend(this, new Porkepic.HasMany(this, Project, "projects", "foreman"))
        # will add a worksheets attributes to the foreman
        _.extend(this, new Porkepic.EmbeddedInMany(this, WorkSheet, "worksheets", "foreman"))

    url : -> "/users/" + this.id
Something went wrong with that request. Please try again.