As I was working on my web app, I noticed that the user object contains a key named _username
which is placed at the beginning.
However, when I add this object to the firebase database, I cannot find the _username
key - everything else seems to be present though.
I'm wondering why this particular key/value pair is not being stored in the database. After all, it is valid JSON. Are there any other solutions to this issue besides simply renaming it?
The structure of the object that I am pushing to an array looks like this:
{
_username:"",
history:[],
// ...
}
Here is a snippet of my code:
var users = $firebaseArray(ref.child("user"));
// adding user
users.$add($scope.session.user);
// even after logging it afterwards, '_username' is still missing
// logging on initialization
users.$loaded().then(function (data) {
$log.debug(data);
});
Everything else gets stored perfectly fine, except for the underlined variable...