Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
183 views
in Technique[技术] by (71.8m points)

android - Is it possible to add many children with the same name without rewriting the existing one in Firebase Realtime Database?

I would to know if is it possible to add field to a child that already contains the same field?

enter image description here

Specifically, I have this database and I would like to add the fields address, latitude and longitude many times whenever the user wants without rewriting the field already contains the value. Thanks in advance to everyone!

question from:https://stackoverflow.com/questions/65832469/is-it-possible-to-add-many-children-with-the-same-name-without-rewriting-the-exi

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Inside one child you can't have two fields with the same name. What you can do is to add, let's say, address1, address2, fields. Or use a list of address values. But having multiple fields with the key address is not an option.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...