You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on May 19, 2025. It is now read-only.
Bug with saving embedded models inside embedded models #512
There seems to be problems with saving embedded models.
When you have embedded models inside embedded models, then the third level models will be only persisted to the database with the first save after the app loaded.
If after a first save you add/remove third level models, then saving the top level model won't have any effect.
Version info
DEBUG: -------------------------------
DEBUG: Ember : 2.13.2
DEBUG: Ember Data : 2.13.1
DEBUG: Firebase : 3.9.0
DEBUG: EmberFire : 0.0.0
DEBUG: jQuery : 3.2.1
DEBUG: -------------------------------
Test case
I've put together a simple app for trying out the scenario: https://github.com/emoryy/emberfire-embedded-model-error
I used ember-cli-dotenv, so put the variables of a test Firebase project into a .env file into the root of the cloned repo like this:
I didn't put authentication handling into the app, so the database needs to be publicly writable.
To run the app: npm install && bower install && ember s
or yarn && bower install && ember s
In the test app there are models named Parent, Child, GrandChild. Child is embedded into Parent, GrandChild is embedded into Child with hasMany relationships
The app provides buttons to create/remove the above models, and a save button that calls save on all Parent models.
Steps to reproduce
In the test app:
Add Parent models
Add Child models
Add GrandChild models
Press save
Add some more GrandChild models (or remove some)
Press Save
Reload the page
Expected behavior
The modifications performed regarding GrandChild models in step 5 should be seen after saving and reloading the page.
Actual behavior
The modifications performed regarding GrandChild models in step 5 can't be seen after saving and reloading the page.
Activity