Closed robertmaxted closed 8 months ago
Try using an IList instead of a List.
@AdamEssenmacher Ahh.. I see.. But IList doesn't have all of the methods ie RemoveAll etc.. Is there no way it can be done with List
@AdamEssenmacher I am trying to run a transaction and update an array of maps within a document.. I must be going wrong here somewhere.
transaction.UpdateData(documentReference, ("some_array", tempList));
Error: Message "Could not convert object of type NameSpace.Models.MapModel to NSObject. Does it extend IFirestoreObject?"
SomeArray is now an IList:
public IList
@robertmaxted have you figured it out yet? The error message is hinting that your models should extend IFirestoreObject, and it doesn't look like your models do...
That worked a treat! Thanks Adam I really appreciate it!
Hi Guys, @TobiasBuchholz @vhugogarcia @Gekidoku @AdamEssenmacher
I am trying to update an array of maps but I am getting an error similar to this:
Message "Do not know how to marshal object of type 'System.Collections.Generic.List`1[NameSpace.SomeModel]' to an NSObject"
here is an example Model (to simplify what I am trying to do)..
And here is what I am trying to do:
it is on this line where I get the error:
transaction.UpdateData(someIDocReference, fieldsToUpdate);
Any help would be greatly appreciated!
Kind regards, Rob.