Questions tagged [backbone-relational]

Get and set relations (one-to-one, one-to-many, many-to-one) for Backbone models.

Get and set relations (one-to-one, one-to-many, many-to-one) for Backbone models.

Resources:

256 questions
6
votes
0 answers

Backbone-Relational and Django-Tastypie: many-to-many fields operating example

May somebody provide an example of operating with many-to-many fields of django.db models' instances through django-tastypie and backbone-relational? That's possible now with using intermediate model. from django.db import models class…
quasiyoke
  • 709
  • 9
  • 21
6
votes
2 answers

Backbone-relational: Association key won't work unless it's the same as the foreign key

I'm trying to get the backbone-relational plugin working with an association between tasks and messages. (A task has many messages). The information is pulled from a standard rails/activerecord site, which has a task_id field as the foreign key. The…
PlankTon
  • 12,443
  • 16
  • 84
  • 153
6
votes
1 answer

Backbone relational events not firing?

class TheModel extends Backbone.RelationalModel relations:[ type: Backbone.HasMany key: 'subModels' relatedModel: SubModel collectionType: SubModels reverseRelation: key: 'TheModel' …
fancy
  • 48,619
  • 62
  • 153
  • 231
6
votes
3 answers

Backbone-associations vs Backbone-relational

I have been looking for information about how can we build relationship in Backbone and came across following two nice plugins: Backbone-relational Backbone-associations Both seems to have exist more than two years and seems to be stable. However,…
6
votes
2 answers

_.bindAll(this) and Uncaught TypeError: Cannot read property 'idAttribute' of undefined in backbone-relation.js

I have two models (User and Task) which are instances of Backbone.RelationalModel. The relation about these two models is the following: // Task model var Task = Backbone.RelationalModel.extend({ relations: [ { …
Lorraine Bernard
  • 13,000
  • 23
  • 82
  • 134
5
votes
2 answers

fetchRelated not fetching related

Been trying to get this up and running for a while now. Basically i have a rest api as backend that returns json, all fine. The problem i have is with backbone-relational. I'm sure i've just got something wrong but i've been searching the nets for a…
JonasFromell
  • 114
  • 7
5
votes
3 answers

Underscore templating help needed - templating collections

I'm using underscore.js for templating. Here is a sample template.