javascriptember.jsember-datafirebaseemberfire

Does emberfire 1.3.2 implement findQuery method?


When I tried to load articles by simply calling this.store.find('article', { typeId: model.get('typeId') }), I get:

Error while processing route: article Assertion Failed: You tried to load a query but your adapter does not implement `findQuery` Error: Assertion Failed: You tried to load a query but your adapter does not implement `findQuery`
    at new Error (native)
    at Error.EmberError (http://localhost:4200/assets/vendor.js:21769:23)
    at Object.Ember.assert (http://localhost:4200/assets/vendor.js:13266:15)
    at Ember.Object.extend.findQuery (http://localhost:4200/assets/vendor.js:71940:15)
    at Ember.Object.extend.find (http://localhost:4200/assets/vendor.js:71546:23)
    at null.loadData (http://localhost:4200/assets/whatnot.js:70:18)
    at applyStr (http://localhost:4200/assets/vendor.js:27968:29)
    at sendEvent (http://localhost:4200/assets/vendor.js:22120:13)
    at notifyObservers (http://localhost:4200/assets/vendor.js:25560:9)
    at propertyDidChange (http://localhost:4200/assets/vendor.js:25363:7)ember.debug.js:25336 logErrorember.debug.js:25293 defaultActionHandlers.errorember.debug.js:25384 triggerEventember.debug.js:50007 triggerember.debug.js:49852 Transition.triggerember.debug.js:49040 finalizeTransitionember.debug.js:48442 (anonymous function)ember.debug.js:50441 tryCatchember.debug.js:50453 invokeCallbackember.debug.js:50424 publishember.debug.js:28563 (anonymous function)ember.debug.js:854 Queue.invokeember.debug.js:919 Queue.flushember.debug.js:724 DeferredActionQueues.flushember.debug.js:149 Backburner.endember.debug.js:204 Backburner.runember.debug.js:223 Backburner.joinember.debug.js:16679 run.joinember.debug.js:39523 __exports__.default.EmberObject.extend._bubbleEventember.debug.js:39474 (anonymous function)jquery.js:4430 jQuery.event.dispatchjquery.js:4116 elemData.handle

I am just asking to find out whether it is not working with certain versions of Ember or whether it has not been implemented yet.

I am using Ember 1.10.0, emberfire 1.3.2

DEBUG: -------------------------------
DEBUG: Ember      : 1.10.0
DEBUG: Ember Data : 1.0.0-beta.14.1
DEBUG: EmberFire  : 1.3.2
DEBUG: jQuery     : 2.1.3
DEBUG: -------------------------------

and the following ember-cli

ember -v
version: 0.1.15
Could not find watchman, falling back to NodeWatcher for file system events
node: 0.10.35
npm: 2.1.8

It doesn't work even with Ember 1.9.1

DEBUG: -------------------------------
DEBUG: Ember      : 1.9.1
DEBUG: Ember Data : 1.0.0-beta.12
DEBUG: EmberFire  : 1.3.2
DEBUG: Handlebars : 2.0.0
DEBUG: jQuery     : 2.1.3
DEBUG: -------------------------------

https://github.com/firebase/emberfire/issues/179


Solution

  • It does not yet. I asked this very question a week or so ago on GitHub.

    However, GitHub user @tstirrat has a fully functional although untested implementation. If you use the code in his PR https://github.com/firebase/emberfire/pull/169 then you can implement a workaround while the final code is debated.

    Syntax is closer to native Firebase JS but I actually think that is a plus.

    Brendan