I have a class with constructor and getters:
Animal {
boolean herbivore;
boolean carnivore;
boolean omnivore; }
And I also have 2 constructors with only herbivore/carnivore fields.
Its possible to use @Exclude on getters when writing in firestore document, so there is no empty fields like this:
herbivore: true;
instead of like this:
carnivore: null;
herbivore: true;
omnivore : null;
But, when reading, if a getter is marked with @Exclude, it will not be read. Is it posible to use @Exclude only when writing and not when reading?