Untuk mempelajari cara mengubah entity secara terprogram, lihat Memperbarui entity.
Sebelum memulai
Halaman ini mengasumsikan bahwa Anda telah membuat entity yang disimpan di Firestore dalam mode Datastore. Anda dapat membuat entity melalui
Datastore API seperti yang dijelaskan dalam
Mulai Menggunakan Datastore API, atau melalui editor
entity di Google Cloud console seperti yang dijelaskan dalam Mulai Cepat.
Pilih database yang diperlukan dari daftar database.
Di menu navigasi, klik Datastore Studio.
Temukan entitas yang ingin Anda edit dengan menentukan namespace, jenis, dan/atau
filter untuk nilai properti. Untuk mempelajari caranya, lihat Menjalankan kueri.
Klik Name/ID entitas. Layar Anda akan terlihat seperti
berikut:
Mengedit properti
Buka halaman Edit Entitas untuk entitas.
Di bagian Properti, klik Editedit untuk properti yang ingin Anda edit.
Di panel Edit properti, ubah Nama, Jenis,
atau Nilai properti. Anda juga dapat mengubah apakah properti diindeks atau tidak. Untuk mempelajari dampak penyertaan atau pengecualian properti dari indeks, lihat Properti yang dikecualikan.
Klik Selesai. Panel Edit properti akan ditutup dan tabel
properti kini menampilkan perubahan Anda. Perubahan tidak akan diterapkan
ke database hingga Anda mengklik Simpan. Tabel properti menandai perubahan yang belum di-commit dengan titik biru di samping nama properti.
Lakukan perubahan tambahan pada properti lainnya. Setelah Anda selesai mengedit,
klik Simpan untuk menerapkan perubahan Anda ke database.
Konsol akan menerapkan perubahan Anda dan mengarahkan Anda kembali ke halaman Datastore Studio.
Menambahkan properti
Buka halaman Edit Entitas untuk entitas. Klik Tambahkan properti.
Di panel Tambahkan properti, tentukan nama untuk properti.
Pilih jenis untuk jenis data properti.
Tentukan nilai untuk properti.
Tentukan apakah properti diindeks. Untuk mempelajari dampak penyertaan atau pengecualian properti dari indeks, lihat Properti yang dikecualikan.
Klik Tambahkan. Panel Tambahkan properti akan ditutup dan tabel properti kini menampilkan perubahan Anda. Perubahan tidak akan diterapkan
ke database hingga Anda mengklik Simpan. Tabel properti menandai perubahan yang belum di-commit dengan titik biru di samping nama properti.
Lakukan perubahan tambahan pada properti lainnya. Setelah Anda selesai mengedit,
klik Simpan untuk menerapkan perubahan Anda ke database.
Konsol akan menerapkan perubahan Anda dan mengarahkan Anda kembali ke halaman Datastore Studio.
Menghapus properti
Buka halaman Edit Entitas untuk entitas. Di bagian Properti, klik
Hapusdelete
untuk properti yang ingin Anda hapus.
Tabel properti kini menampilkan perubahan Anda. Perubahan tidak akan
diterapkan ke database hingga Anda mengklik Simpan. Tabel properti menandai penghapusan properti yang belum di-commit dengan nama dan nilai properti yang dicoret.
Anda dapat mengurungkan penghapusan yang belum dilakukan dengan mengklik Pulihkan
di baris tabel properti.
Lakukan perubahan tambahan pada properti lainnya. Setelah Anda selesai mengedit,
klik Simpan untuk menerapkan perubahan Anda ke database.
Properti kompleks
Editor entitas mendukung properti dengan jenis kompleks seperti Array dan
Embedded entity.
Properti array
Saat Anda menambahkan atau mengubah nilai properti Array, berikan nilai dalam format JSON.
Jika Anda memasukkan JSON yang tidak valid untuk kolom Nilai, Anda akan menerima pesan error. Anda tidak akan dapat menambahkan properti jika JSON tidak valid.
Properti entity tersemat
Saat Anda menambahkan atau mengubah nilai properti Embedded entity, berikan
nilai dalam format JSON.
Jika Anda memasukkan JSON yang tidak valid untuk kolom Nilai, Anda akan menerima pesan error. Anda tidak akan dapat menambahkan properti jika JSON tidak valid.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-05 UTC."],[[["\u003cp\u003eThis guide details the process of editing entities within the Google Cloud console's Datastore Studio, which assumes an entity has already been created in Firestore in Datastore mode.\u003c/p\u003e\n"],["\u003cp\u003eTo edit an entity, you can find the entity in Datastore Studio, and then on the Edit Entity page you can modify a property's name, type, value, or index status, or add new properties with specific data types and index settings.\u003c/p\u003e\n"],["\u003cp\u003eYou can also delete a property from an entity, with uncommitted deletions being highlighted and restorable, and remember that no changes are saved to the database until you click "Save".\u003c/p\u003e\n"],["\u003cp\u003eWhen working with array or embedded entity properties, it is required that you input values in valid JSON format to prevent errors.\u003c/p\u003e\n"]]],[],null,["# Edit an entity in the console\n\nThis page describes how to edit an entity using the [Google Cloud console](https://console.cloud.google.com/).\n\nTo learn how to modify an entity programmatically, see [Updating an entity](/datastore/docs/concepts/entities#updating_an_entity).\n\nBefore you begin\n----------------\n\nThis page assumes you have already created an entity that is stored in\nFirestore in Datastore mode. You can create an entity through the\nDatastore API as described in\n[Getting Started with the Datastore API](/datastore/docs/datastore-api-tutorial), or through the entity\neditor in the [Google Cloud console](https://console.cloud.google.com/) as described in the [Quickstart](/datastore/docs/store-query-data).\n\nSelect an entity to edit\n------------------------\n\n1. In the Google Cloud console, go to the **Databases** page.\n\n [Go to Databases](https://console.cloud.google.com/datastore/databases)\n2. Select the required database from the list of databases.\n\n3. In the navigation menu, click **Datastore Studio**.\n\n4. Find the entity you want to edit by specifying the namespace, kind, and/or\n filters for property values. To learn how, see [Run a query](/datastore/docs/store-query-data#run_a_query).\n\n5. Click on the **Name/ID** of an entity. Your screen should look similar to the\n following:\n\n### Edit a property\n\n1. Open the **Edit Entity** page for an entity.\n Under **Properties** , click **Edit** edit for the property you want to edit.\n\n | **Tip:** You can filter the properties table. Click **Filter properties** at the top of the table.\n2. In the **Edit property** pane, modify the property's **Name** , **Type** ,\n or **Value** . You can also modify whether the property is indexed. To learn\n about the impact of including or excluding a property from indexes, see\n [Excluded properties](/datastore/docs/concepts/indexes#unindexed_properties).\n\n3. Click **Done** . The **Edit property** pane closes and the\n properties table now shows your changes. Changes are not committed\n to the database until you click **Save**. The properties table highlights\n uncommitted changes with a blue dot next to the property name.\n\n4. Make additional changes to other properties. When you complete your edits,\n click **Save** to commit your changes to the database.\n\n The console commits your changes and takes you back to the **Datastore Studio** page.\n\n### Add a property\n\n1. Open the **Edit Entity** page for an entity. Click **Add property**.\n2. In the **Add a property** pane, specify a name for the property.\n3. Select a type for the property's data type.\n4. Specify a value for the property.\n5. Specify whether the property is indexed. To learn about the impact of including or excluding a property from\n indexes, see [Excluded properties](/datastore/docs/concepts/indexes#unindexed_properties).\n\n6. Click **Add** . The **Add a property** pane closes and the\n properties table now shows your changes. Changes are not committed\n to the database until you click **Save**. The properties table highlights\n uncommitted changes with a blue dot next to the property name.\n\n7. Make additional changes to other properties. When you complete your edits,\n click **Save** to commit your changes to the database.\n\n The console commits your changes and takes you back to the **Datastore Studio** page.\n\n### Delete a property\n\n1. Open the **Edit Entity** page for an entity. Under **Properties** , click\n **Delete** delete\n for the property you want to delete.\n\n2. The properties table now shows your changes. Changes are not\n committed to the database until you click **Save**. The properties table\n highlights uncommitted property deletions with crossed out names and property\n values.\n\n You can undo an uncommitted deletion by clicking **Restore**\n in the property's table row.\n3. Make additional changes to other properties. When you complete your edits,\n click **Save** to commit your changes to the database.\n\nComplex properties\n------------------\n\nThe entity editor supports properties with complex types such as `Array` and\n`Embedded entity`.\n\n### Array properties\n\nWhen you add or modify the value of an `Array` property, provide a value in JSON\nformat.\n\nIf you enter invalid JSON for the **Value** field you will receive an error\nmessage. You will not be able to add the property if the JSON is invalid.\n\n### Embedded entity properties\n\nWhen you add or modify the value of an `Embedded entity` property, provide a\nvalue in JSON format.\n\nIf you enter invalid JSON for the **Value** field you will receive an error\nmessage. You will not be able to add the property if the JSON is invalid.\n\nWhat's next\n-----------\n\n- Learn about [best practices for entities](/datastore/docs/best-practices#entities)."]]