0
FavoriteData  //This is the parent
  ReferenceID // Reference ID is the ID of device if there is no account else the user ID
   PushKey //Key generated when pushing an item in database
     "name": "John Doe"
     "age": "25"      
   PushKey
     "name": "Royal Smith" 
     "age": "20" 

Is there a way to update the reference ID, I want to change it from the device ID into User ID if they sign in thier account

  • There's no way to rename a _key_. You'll have to read the value, set again with update key and delete the previous one. – Dharmaraj Jun 26 '22 at 06:22
  • This [answer](https://stackoverflow.com/questions/50147779/failed-to-parse-note-when-adding-firebase-completelistener/50153774) will definitely help. – Alex Mamo Jun 26 '22 at 07:32

0 Answers0