Can't destroyRecord (monkeypatch on DS.Store not working)
Hi, I get "undefined is not a function" in DS.Model.reopen.deleteRecord. It's trying to call the monkey-patched DS.Store.reopen.recordWillDelete. I see the monkeypatch in the same file, so I have no idea why it's not working.
I'm using ember-cli with Ember 1.10, Ember Data 1.0 beta 15, and EmberFire 1.4.2. But I also tried it with Ember 1.9.1 + Ember Data 1.0 beta 14 and got the exact same result. Am I doing something crazy, or is this in fact broken...?
Aha! EmberFire 1.3.3 works! But EmberFire 1.4.0 doesn't.
What I don't get is why the DS.Model monkeypatch works, but the DS.Store monkeypatch just before it in the same initializer file doesn't.
that's really odd that the monkey patch fails right after the working one!
Is this using emberfire as an ember-cli addon or included via emberfire.min.js?
Is it possible to reproduce in a JSbin?
Hi @tstirrat, it's the same with ember-cli and without. I made a couple of JSFiddles:
JSFiddle with Ember 1.9.1, EmberData 1.0.0-beta12, EmberFire 1.4.2 (not working): http://jsfiddle.net/8uhtv1ze/
JSFiddle with the same, except for EmberFire 1.3.3 (working): http://jsfiddle.net/s1Lsfp9n/
I am guessing that the store object is created and injected before the .reopen() is called thus it has an incorrect prototype..
Still working on this...
Thank you. I wish I had a clue, I'd send a pull request...
Will likely do a release tomorrow morning with this fix in it -> #216
Awesome! Thanks.
TypeError: this.store.recordWillDelete is not a function I use emberfire v1.4.4
@absemetov can you please let me know of your ember-data and ember versions?
Ember 1.9.1 Ember Data 1.0.0-beta.16.1 Firebase 2.2.3 EmberFire 1.4.4 Handlebars 2.0.0 jQuery 2.1.3 http://absemetov.koding.io/emberfire.html
In the example you provided you're using ember-data beta.16.1 and emberfire 1.3.3 which are not compatible (due to ember-data changes). Can you make a minimal test with emberfire 1.4.4 that reproduces the problem?
v1.4.0-1.4.4 TypeError: this.store.recordWillDelete is not a function in line 817
I just tried this with a new ember-cli project and it cannot reproduce it:
DEBUG: -------------------------------
DEBUG: Ember : 1.11.1
DEBUG: Ember Data : 1.0.0-beta.16.1
DEBUG: Firebase : 2.2.4
DEBUG: EmberFire : 1.4.4
DEBUG: jQuery : 1.11.2
DEBUG: -------------------------------
Can you please provide a MCVE that reproduces your problem?
I use EmberFire Without Ember CLI https://www.firebase.com/docs/web/libraries/ember/guide.html#section-without-ember-cli
ok, can you recreate in a jsBin/jsFiddle? this will be like using without ember-cli.
http://jsbin.com/quligo/1/
@absemetov I was able to reproduce with the non ember-cli usage. I've made a patch for this here: #241
thanks @tstirrat