Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining properties on your model class breaks the link to Firebase #11

Closed
balinterdi opened this issue Nov 15, 2013 · 3 comments
Closed

Comments

@balinterdi
Copy link

When model classes are defined in Ember, its properties are listed with their initial values:

App.User = EmberFire.Object.extend({
  username: '',
  votesLeft: 10
})

Since emberFire relies on missing property lookups on the model object (EmberFire.Object) to be proxied to Firebase, if one defines the properties thusly, emberFire will stop working because the property lookups do not get propagated to Firebase.

I'm not sure how much of a problem this is. I'm sure this will bite several Ember devs when starting to use Firebase and I also think the above definition of properties is pretty handy to see what properties a model class has.

I jotted this down to hear your opinion and to see if there is a way around this.

@NedgoIO
Copy link

NedgoIO commented Jan 6, 2014

I would also like to hear the firebase team's opinion on this.

@anantn
Copy link
Contributor

anantn commented Jan 6, 2014

We discussed this a while ago, we'll be looking into alternatives such as:
a) Detecting when a developer sets properties like this and logging a message
b) Using hasOwnProperty and including manually set properties in the remote data (this is trickier, especially if we want to be compatible with older browsers re: detecting when the properties change).

@aputinski
Copy link
Collaborator

@balinterdi @ogdenit We're releasing v0.2.0 which is designed to work directly with Ember Data, so I'm going to close this issue for now because v0.1.0 will no longer be officially supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants