3

Preface- I recently learned about Backbone-Relational because I was interested in finding some sort of framework for working with nested backbone models.

Problem- Console Warning:

Relation = r : missing model, key or relatedModel (function (){return i.apply(this,arguments)}, "models", undefined).

Comments- I've done some research and apparently it's a scope issue and there are ways of resolving the warning but as far as I'm aware nothing official.

Question- Is there any official in depth documentation for dealing with requirejs compatibility?

-OR-

Is there a requireJS savvy alternative?

ogginger
  • 433
  • 4
  • 11
  • Re: your research, are you referring to this?: http://stackoverflow.com/questions/9962695/creating-nested-models-with-backbonejs-backbone-relational-requirejs – Chris Salzberg Jun 13 '13 at 04:14
  • Yes, among others. Thank you. The warning can be resolved. It's the information I'm after. The backbonerelational.org documentation isn't very extensive. For instance, I don't understand the context of addModelScope()- like where/when/how it should be used. The documentation just says what it is that it does. It's probably a long shot but I thought I'd put it out there to the community and see what i got back. – ogginger Jun 13 '13 at 04:28

1 Answers1

2

There is a lightweight alternative to Backbone-relational here called backbone associate

https://github.com/rjz/backbone.associate

Also on their page they list for more control

https://github.com/pathable/supermodel

I'm not sure how they will play with r.js but it's definitely worth a shot, backbone.associate looks promising for you!

  • 1
    Another alternative is [Backbone JJRelational](https://github.com/jj-studio/Backbone-JJRelational), also supporting many-to-many relations. DISCLAIMER: I am one of the authors. Nevertheless worth a shot ;) – johnnycrab Nov 21 '13 at 20:20