vidigami / backbone-orm

A polystore ORM for Node.js and the browser
http://vidigami.github.io/backbone-orm
MIT License
237 stars 15 forks source link

TypeError: this.model is undefined #22

Closed marcelklehr closed 10 years ago

marcelklehr commented 10 years ago

the following line throws an error: https://github.com/vidigami/backbone-orm/blob/master/src/relations/many.coffee#L120

targetProto = this.model.prototype
                           ^
backbone.Collection#set
backbone.Colleciton#add
backbone-orm.Many#add
One#_bindBacklinks.setBacklink(<Anonymous Function>)
One#_bindBacklinks
One#initializeModel
overrides.initialize
Backbone.Model
extend.child
new MyApp.MyModel

(This is a handwritten stack since the original files & line numbers are pretty arbitrary.)

I don't know why this happens, so I thought you might know more.

marcelklehr commented 10 years ago

Confirmed it's not a backbone-orm issue