class TheModel extends Backbone.RelationalModel     relations:[         type: Backbone.HasMany         key: 'subModels'         relatedModel: SubModel         collectionType: SubModels         reverseRelation:             key: 'TheModel&#...
I have a simple application which defines two classes, a Person and a PersonGroup, wherein there is a many-to-many relationship in place.  A Person can have no group, or be assigned to all groups, and anything in between.  The example on backbonerela...
I need to destroy backbone relational model on client side, without performing any http requests. Under "destroy" word i mean removing model from all collections, removing all relations from other models to current one, and finally, removing...
I'm using Backbone relational and it's great. The problem I have run into is when I need the backend to provide the url for models to attach to.  This isn't such a problem when using one-to-one relationships because the model can hold ont...
I've just recently stared using backbone.js and since i have a rather large data-structure, i am using backbone-relational in order to keep it as lean and as fast as possible.  Now i would like to use marionette views, but i've been strugglin...
I'm trying to create a backbone relational model with 2 "hasMany" relations of the same type, but I'm getting the error: "Cannot create relation=child on "(myReverseRelationName)" for model=child: already taken by relation...
Need to call .delegateEvents() on all child views inside a parent "collection" view in order to re-delegate events after having removed the parent view from the page and then put it back on.  I can see two ways of doing this, both of which do...
I've read this and this question already but it didn't help. I called fetchRelated this way:    initialize: function(){            Artist.fetchRelated(                 'albums',                 {success: this.render}            );   }...
I have the following two models: User and Job. Each user can have just one job. The user.attributes and job.attributes look like these (1):  (1)  user.attributes = {     id: 1,     name: 'barName',     job_id: 5 }  job.attributes = {     id:...
I'm new to Backbone (still stuck in Ruby on Rails mode) and am a bit confused about how to add a Collection to a Model as a property/attribute (is "attribute" the correct term?).   For example, I have a Model named current_plan, and a var...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.