Polymer syncs an empty dynamically generated id with the data then syncs the data with the data binded key. How do i stop this from happening.
<firebase-document
path="/users/[[authenticatedUser.id]]/token"
data="[[messagingAPI_TOKEN]]">
</firebase-document>
expected outcome:
{
"users" : {
"57f49f8ffaf7e800116e96e2" : {
"token" : reallyLongToken
}
}
}
actual outcome:
{
"-KhitjHsZDTjsIezQBiZ" : reallyLongToken,
"users" : {
"57f49f8ffaf7e800116e96e2" : {
"token" : reallyLongToken
}
}
}
Looks like the "ghost" data is created as a result of null return from [[authenticatedUser.id]]. Because it is dynamic and not from my system is is wasteful and fills the database with unwanted data.