Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Query on Firebase Model Error #144

Open
goddamnyouryan opened this issue Jun 22, 2015 · 0 comments
Open

Query on Firebase Model Error #144

goddamnyouryan opened this issue Jun 22, 2015 · 0 comments

Comments

@goddamnyouryan
Copy link

I am trying to do a query on a firebase model (like it says we can do in the docs) and I am getting a strange error I don't quite understand. Here is my model (in coffeescript):

class Entities.InvoiceCharge extends Backbone.Firebase.Model
  firebase: "< MY FIREBASE >/charges"
  url: ->
    new Firebase(@firebase).orderByChild('invoice').equalTo('-JsJtr4kpzJtJY9lJKbB')

Just wanting to return the first "charge" that has an "invoice" attribute equal to '-JsJtr4kpzJtJY9lJKbB' but I am getting a strange error:

Uncaught TypeError: this.firebase.update is not a function

Which is referencing this line:

  // apply local changes remotely
  this._listenLocalChange(function(model) {
    this.firebase.update(model);
  });

Any idea what might be causing this? I've inspected this firebase instance, it looks normal to me but for some reason doesn't have the update function attached to it.

@goddamnyouryan goddamnyouryan changed the title Query on Firebase Model Query on Firebase Model Error Jun 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant