There is no real documentation about how to properly store the auto-generated ID of a Firestore document in a custom Java object. Retrieving the ID is easy, but how to properly store it to avoid redundancy.

This is my approach:

Model class:

```
public class Note {
    private String documentId;
    private String title;
    private String description;

    public Note() {
        //public no arg constructor necessary
    }

    public Note(String title, String description) {
        this.title = title;
        this.description = description;
    }

    @Exclude
    public String getDocumentId() {
        return documentId;
    }

    public void setDocumentId(String documentId) {
        this.documentId = documentId;
    }

    public String getTitle() {
        return title;
    }

    public String getDescription() {
        return description;
    }
}

```

Load data:

```
public void loadNotes(View v) {
    notebookRef.get()
            .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
                @Override
                public void onSuccess(QuerySnapshot queryDocumentSnapshots) {
                    List<Note> noteList = new ArrayList<>();

                    for (QueryDocumentSnapshot documentSnapshot : queryDocumentSnapshots) {
                        Note note = documentSnapshot.toObject(Note.class);
                        note.setDocumentId(documentSnapshot.getId());
                        noteList.add(note);
                    }
                }
            });
}

```

My questions: 

1) Is the `@Exclude` on the getter method enough? Should I also add it to the setter? Or to the field declaration?

2) Am I missing a more convenient way to handle the document ID in a model class?