As simple as it gets, right now .key is hardcoded.
We have some scenarios where being able to rename it would help us a lot. Right now we have to do it after every request / update.
We should take care of it in updates/sets as we do with .key right now.
Do you have a use case where you need to change the .key property?
When I mix firebase data with other origins and I want to join data.
A basic example:
Firebase
{.key: 1, name: 'name'}
Mysql:
{myprimarykey: 1, surname: 'surname'}
If we can get myprimarykey instead of .key, we don't have to make the "rename/translation" everywhere.
Like you could do "SELECT column1 AS key FROM table"
Not as important, but found it:
When libs won't work with dot properties. They allow me to work with "key" prop but not with ".key" props, because they have problems with dots properties and nested properties.
I also ran into this issue when trying to pass a whole firebase object into a subcomponent as a property with v-bind="myItem". I ended up with the following two errors:
[Vue warn]: Error in nextTick: "InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '.key' is not a valid attribute name."
and
DOMException: Failed to execute 'setAttribute' on 'Element': '.key' is not a valid attribute name.
I was able to work around this by making a computed property that renames the key, but it'd be nice to just be able to specify an alternate key declaratively, and it'd be even nicer if the default didn't use invalid attribute characters.
@zevdg That'll be solved once the key is made non enumerable
I'm closing this in favor of https://github.com/vuejs/vuefire/issues/240