I\'ve got several properties that should not be transferred to Firestore, such as metadata (\"id\" or \"parent\"), and with Firebase Realtime database, there was the option
Grimthorr's answer didn't work for me. So, I put @Exclude annotation before the getter method of the field I want to exclude from writing to Firestore db, and it worked: