This is just a silly little bug, not high priority or anything at all, but I figured might as well open an issue on it.
Expected Behavior
The @Id() annotated String field does not get to be generated into the document in Firestore, even if I use a
type alias like:
typedef ExampleId = String;
Actual Behavior
If I write:
typedef ExampleId = String;
@firestoreSerializable
class Example {
@Id()
final ExampleId id;
...
}
Then I add some Example documents into the collection in Firebase, the 'id' field appears in the document, containing the dummy id, not the Firestore assigned one. So the next time, when i get the document, it gets the id wrongly assigned to the dummy id.
Steps to Reproduce the Problem
Generate a document with the type of the @Id() field being a typedef for String
run the code generation and create some documents with the typedef-ed Id, then read them back from Firestore
notice, that the Object's id is the one you sent up and not the Firebase assigned one. Also, if you open the firestore GUI on web, you'll see the id field appear in the document
This is just a silly little bug, not high priority or anything at all, but I figured might as well open an issue on it.
Expected Behavior
The @Id() annotated String field does not get to be generated into the document in Firestore, even if I use a type alias like:
typedef ExampleId = String;
Actual Behavior
If I write:
Then I add some Example documents into the collection in Firebase, the 'id' field appears in the document, containing the dummy id, not the Firestore assigned one. So the next time, when i get the document, it gets the id wrongly assigned to the dummy id.
Steps to Reproduce the Problem
Specifications