I am using Firestore by Firebase. There I am using the ArrayList. I save a lot of numbers in a few ArrayLists. But now I have the problem, that I can not save a number twice in an ArrayList.
Then I found this where it is described(docs): https://firebase.google.com/docs/firestore/manage-data/add-data
"arrayUnion() adds elements to an array but only elements not already present"
Is there really no way to save a number twice or more times in an ArrayList in Firestore?
But an interesting thing is that I can add the values at my dashboard, but the user through code not.
EDIT:
I am adding the numbers like this to the ArrayList:
gradesRef.onSnapshot((doc) => {
gradesRef.update({
[grade_type]: firebase.firestore.FieldValue.arrayUnion(grade)
});
});