Stay organized with collections
Save and categorize content based on your preferences.
Firebase.Firestore.FirestoreDocumentIdAttribute
Attribute indicating that a property should be populated with the Firestore document ID.
Summary
This attribute must only be applied to properties of string or DocumentReference. This attribute is ignored when serializing a document to Firestore. This attribute must not be applied on a property which also has FirestorePropertyAttribute.
Inheritance
Inherits from: Attribute
Public functions
FirestoreDocumentIdAttribute
FirestoreDocumentIdAttribute()
Creates an instance of the attribute.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-06-17 UTC.
[null,null,["Last updated 2021-06-17 UTC."],[],[],null,["# Firebase.Firestore.FirestoreDocumentIdAttribute Class Reference\n\nFirebase.Firestore.FirestoreDocumentIdAttribute\n===============================================\n\nAttribute indicating that a property should be populated with the [Firestore](/docs/reference/unity/namespace/firebase/firestore#namespace_firebase_1_1_firestore) document ID.\n\nSummary\n-------\n\nThis attribute must only be applied to properties of string or [DocumentReference](/docs/reference/unity/class/firebase/firestore/document-reference#class_firebase_1_1_firestore_1_1_document_reference). This attribute is ignored when serializing a document to [Firestore](/docs/reference/unity/namespace/firebase/firestore#namespace_firebase_1_1_firestore). This attribute must not be applied on a property which also has [FirestorePropertyAttribute](/docs/reference/unity/class/firebase/firestore/firestore-property-attribute#class_firebase_1_1_firestore_1_1_firestore_property_attribute).\n\n### Inheritance\n\nInherits from: Attribute\n\n| ### Constructors and Destructors ||\n|---|---|\n| [FirestoreDocumentIdAttribute](#class_firebase_1_1_firestore_1_1_firestore_document_id_attribute_1a26e83ee2eaf04e582b562f3420424b9c)`()` Creates an instance of the attribute. ||\n\nPublic functions\n----------------\n\n### FirestoreDocumentIdAttribute\n\n```c#\n FirestoreDocumentIdAttribute()\n``` \nCreates an instance of the attribute."]]