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
472 views
in Technique[技术] by (71.8m points)

android - Update a document in firestore

I would like the update a document in Firebase. The problem is that you can only update a specific field?

I would like to do something like this:

fs.collection("users").document(user.id).update(user)

The problem is that Kotlin forces to put a field in update, like this:

fs.collection("users").document(user.id).update("firstname", user)

But I don't want that, I want to update the whole document with my model not a field.

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)
Waitting for answers

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

...