jbrunton / core-js

2 stars 1 forks source link

More expressive syntax for loading complex nested resources #1

Open jbrunton opened 12 years ago

jbrunton commented 12 years ago

Ideally, you should be able to express precisely the associations you want to load, and the extensions to inject when assembling view models - eg,

new User().load(user_id, {
    extenders: { auditDates: { created: true, modified: true },
    includes: {
        recent_posts: {
            extenders: { auditDates: {} },
            includes: { tags: {} }
        },
        blogs: { extenders: { auditDates: {} } }
    }
});