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.
Creating a record without content fails, but reports success #387
An ID is assigned in the ED store, and the record reports having been saved successfully, but no data has actually been recorded in Firebase.
Expected behavior
Any empty record should be returned when fetching the list of Tasks
Actual behavior
The new Task is not saved, unless data is added.
Pretty sure this occurs because there is no way to store an empty record in Firebase -- it just deletes the node. In the ED world, though, that's a surprising result -- usually fields are optional, and there's a big difference between a record being created with no attributes set vs no record at all
I see two workable options:
use some sort of sentinel value as a default (false?), that gets interpreted as null when loaded by the adapter
fail loudly with an explicit error stating empty objects aren't supported in EmberFire
Thanks for the report on this, will probably need to do the second option. The sentinel value will add more confusion that it's worth and its pretty useless storing an empty record -- at the very minimum you'd probably want a created date.
Activity
tstirrat commentedon Jun 13, 2016
Thanks for the report on this, will probably need to do the second option. The sentinel value will add more confusion that it's worth and its pretty useless storing an empty record -- at the very minimum you'd probably want a created date.